Wed Sep 22 01:34:19 PDT 2004
- Previous message: [Slony1-commit] By wieck: Update both nodes
- Next message: [Slony1-commit] By wieck: Lower the lock on sl_event for event creation from ACCESS
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Log Message:
-----------
Lower the lock on sl_event for event creation from ACCESS EXCLUSIVE
to EXCLUSIVE. The purpose of this lock is to ensure that events are
assigned sequence numbers in commit order. An exclusive lock is
enough for that.
Jan
Tags:
----
REL_1_0_STABLE
Modified Files:
--------------
slony1-engine/src/backend:
slony1_funcs.c (r1.17 -> r1.17.2.1)
-------------- next part --------------
Index: slony1_funcs.c
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/src/backend/slony1_funcs.c,v
retrieving revision 1.17
retrieving revision 1.17.2.1
diff -Lsrc/backend/slony1_funcs.c -Lsrc/backend/slony1_funcs.c -u -w -r1.17 -r1.17.2.1
--- src/backend/slony1_funcs.c
+++ src/backend/slony1_funcs.c
@@ -1109,10 +1109,12 @@
plan_types[0] = INT4OID;
/*
- * Create the saved plan
+ * Create the saved plan. We lock the sl_event table in exclusive
+ * mode in order to ensure that all events are really assigned
+ * sequence numbers in the order they get committed.
*/
sprintf(query,
- "LOCK TABLE %s.sl_event; "
+ "LOCK TABLE %s.sl_event IN EXCLUSIVE MODE; "
"INSERT INTO %s.sl_event "
"(ev_origin, ev_seqno, "
"ev_timestamp, ev_minxid, ev_maxxid, ev_xip, "
- Previous message: [Slony1-commit] By wieck: Update both nodes
- Next message: [Slony1-commit] By wieck: Lower the lock on sl_event for event creation from ACCESS
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list