[Pgpool-general] PgPool and sequences
Pascal Cohen
pcohen at wimba.com
Sun Dec 2 09:44:37 UTC 2007
Hello, I have read in the documentation that there is no guarantee that
sequence may have the same value on all servers.
This is not perhaps not very probable (theoretical) but could such a
following situation occur:
I have two servers replicated and I want to add in a users table (id,
name) with a sequence users_seq, two users A and B:
First connection sends to PgPool: INSERT INTO USERS VALUES
(next_val('users_seq'),'A'); -- ReqA
At the same time a second connection sends to PgPool: INSERT INTO USERS
VALUES (next_val('users_seq'),'B'); -- ReqB
Could we have something like:
- On Server 1:
1 A
2 B
- On server 2:
1 B
2 A
I mean updates are not sent in the same order to all servers for any
reason (several CPUs on server handling the request slower, or anything
else). Is that possible ?
Thanks
Pascal
More information about the Pgpool-general
mailing list