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.
- 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)
-- 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;
-- 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;