On Apr 21, 2009, at 2:15 PM, Jeff Davis wrote:
> In Session1, the serializable transaction sees an empty version of
> bar,
> even though it had tuples in at the time Session1 got its serializable
> snapshot.
Indeed so, and I understand that part. But since Session1 didn't try
to access 'bar', it can't distinguish that sequence from:
Session2:
BEGIN;
TRUNCATE bar;
COMMIT;
Session1:
BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
SELECT * FROM foo;
SELECT * from bar;
COMMIT;
I've been trying to come up with a scenario in which a TRUNCATE
violates concurrency expectations; I'm sure one exists, but my brain
isn't wrapping around it.