Bug 258.
authorSteve Singer <ssinger@ca.afilias.info>
Tue, 7 Aug 2012 16:58:30 +0000 (12:58 -0400)
committerSteve Singer <ssinger@ca.afilias.info>
Tue, 7 Aug 2012 16:58:30 +0000 (12:58 -0400)
Obtain an access exclusive lock not an exclusive one.
A concurrent select statement does not seem to block
the exclusive lock (but does block the access exclusive one)
and will block the truncate.

RELEASE
src/backend/slony1_funcs.sql

diff --git a/RELEASE b/RELEASE
index 4c4aedc559fe6d0883d20ba2e2d094051bb33c80..b07fad39c196590a18b8b42ddaf40ffcf8331f00 100644 (file)
--- a/RELEASE
+++ b/RELEASE
@@ -4,6 +4,8 @@
 - Bug #240 :: Improve notes on VACUUM
 
 ** 2.2.0
+- Bug #258 :: The cleanup thread should no longer block waiting on a lock
+
 - Bug #264 :: Add an ORDER BY to the log selection query so the xid's get compressed
 
 - Bug 274  :: Include schemadoc.xml as part of the distribution tar(again)
index 73064ee7b8fcfb74faa9855322356af2ccdb5f4f..7c6ac2580e39c6be1e478ec99e98b54c1672be5d 100644 (file)
@@ -5032,7 +5032,7 @@ BEGIN
                -- transaction is committed.
                -- ----
                begin
-                       lock table @NAMESPACE@.sl_log_2 in exclusive mode nowait;
+                       lock table @NAMESPACE@.sl_log_2 in access exclusive mode nowait;
                exception when lock_not_available then
                        raise notice 'Slony-I: could not lock sl_log_2 - sl_log_2 not truncated';
                        return -1;
@@ -5086,7 +5086,7 @@ BEGIN
                -- transaction is committed.
                -- ----
                begin
-                       lock table @NAMESPACE@.sl_log_1 in exclusive mode nowait;
+                       lock table @NAMESPACE@.sl_log_1 in access exclusive mode nowait;
                exception when lock_not_available then
                        raise notice 'Slony-I: could not lock sl_log_1 - sl_log_1 not truncated';
                        return -1;