Merlin Moncure <mmonc...@gmail.com> writes: > Michael Malis via: > http://malisper.me/postgres-transactions-arent-fully-isolated/ has > determined that postgresql transactions are not fully isolated even > when using serializable isolationl level.
> If I prep a table, ints via: > postgres=# create table ints (n int); > CREATE TABLE > postgres=# insert into ints values (1); > INSERT 0 1 > postgres=# insert into ints values (2); > INSERT 0 1 > and then run two concurrent in serializable isolation mode > transactions like this: > T1: BEGIN > T1: UPDATE ints SET n = n + 1; > T2: BEGIN > T2: DELETE FROM ints where n = 2; -- blocks > T1: COMMIT; -- T2 frees > T2: SELECT * FROM ints; -- both rows 2 and 3 visible > T2: COMMIT: Hm, I get ERROR: could not serialize access due to concurrent update in T2 immediately after T1 commits. What version are you testing? Are you sure you selected serializable mode for both xacts? (I think it would work like this even if only T2 is marked serializable, but didn't test.) regards, tom lane -- Sent via pgsql-hackers mailing list (email@example.com) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers