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
parent
b702145ac3
commit
6f7f44b744
|
@ -96,9 +96,7 @@ void pgsm_log(PgsmLogSeverity severity, const char *format, ...)
|
|||
LWLockRelease(pgss->errors_lock);
|
||||
/*
|
||||
* 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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue