PG-286: Fix deadlock.

Can't call elog() function from inside the pgsm_log as the pgss_hash
lock could be already acquired in exclusive mode, since elog() triggers
the psmg_emit_log hook, when it calls pgss_store it will try to acquire
the pgss_hash lock again, leading to a deadlock.
pull/157/head
Diego Fronza 2021-12-06 13:24:22 -03:00
parent b702145ac3
commit 6f7f44b744
1 changed files with 0 additions and 2 deletions

View File

@ -96,9 +96,7 @@ void pgsm_log(PgsmLogSeverity severity, const char *format, ...)
LWLockRelease(pgss->errors_lock); LWLockRelease(pgss->errors_lock);
/* /*
* We're out of memory, can't track this error message. * We're out of memory, can't track this error message.
* In this case we must fallback to PostgreSQL log facility.
*/ */
elog(WARNING, "pgsm_log_error: <OUT OF MEMORY>");
return; return;
} }