Steve Singer ssinger at ca.afilias.info
Thu Jul 7 12:42:56 PDT 2011
Fix for bug 222.
The cleanupThread can block new sessions from finishing the logTrigger.
If the cleanupThread has to wait/block to get an exclusive lock
during the truncate on sl_log_1 or sl_log_2 (and this can happen dispite
NOWAIT in logswitch_finish) then any new sessions will block
waiting to obtain a row lock while preparing the plans for
sl_log_1 and/or sl_log_2.  The problem is that the plans
are prepared for both sl_log_1 and sl_log_2 irrespective
of what sl_log_status is.

This patch will have the log trigger only prepare
the plan based on the current setting of sl_log_status
so the log trigger won't try to prepare a plan against
a log table that is being truncated.

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=slony1-engine.git;a=commitdiff;h=b9ef590e56fab3fa6f3d06192a3ea73650036284

Modified Files
--------------
src/backend/slony1_funcs.c |  102 +++++++++++++++++++++++++++-----------------
1 files changed, 63 insertions(+), 39 deletions(-)



More information about the Slony1-commit mailing list