Dmitry Koterov dmitry at koterov.ru
Sat Aug 4 12:42:00 PDT 2007
Hello.

Could you please answer three questions about Slony's transaction
serialization? (I suppose that two first answers will be "yes", but I'd like
to hear the opinions of gurus.) Unfortunately I cannot find direct answers
in the Slony documentation.

1. I have the following non-overlapped sequence of transactions in a SINGLE
(!!!) session (connection) on an origin:

BEGIN;
UPDATE tbl SET a=3D10 WHERE b=3D10;
COMMIT;
--
-- some little delay (e.g. 0.1s)
--
BEGIN;
UPDATE tbl SET a=3D20 WHERE b=3D20;
COMMIT;

The question is: if a subscriber received and processed the result of the
transaction #2, could I be sure that it had also received and committed a
result of the transaction #1? Transactions are not overlapped.


2. I have the following sequence in a SINGLE session (also not overlapped):

BEGIN;
UPDATE tbl SET c=3D10 WHERE d=3D10;
COMMIT;
--
-- some delay (e.g. 0.1s)
--
SELECT nextval('some_seq');  -- =3D> save a result to $some_seq variable

The question is: if subscriber's currval('some_seq') is greater than
$some_seq, could I be sure that the transaction #1 is also processed and
committed by this subscriber?


3. I have the following sequence in a SINGLE session (not overlapped):

BEGIN;
UPDATE tbl SET c=3D10 WHERE d=3D10;
COMMIT;
--
-- some delay (e.g. 0.1s)
--
SELECT max(sl_event.ev_seqno);  -- =3D> save a result to $seqno variable

The question is: if subscriber's max(sl_event.ev_seqno) is greater than
$seqno, could I be 100% sure that the transaction #1 is already processed
and committed by this subscriber?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.slony.info/pipermail/slony1-general/attachments/20070804/=
ceaa30aa/attachment.htm


More information about the Slony1-general mailing list