From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
---|---|
To: | <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Question about row visibility after locks |
Date: | 2002-11-08 17:42:57 |
Message-ID: | 20021108093636.O12444-100000@megazone23.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I've been wondering (and probably should look through
the code, but figured asking would be faster) if there's
any guarantee that I'll see rows inserted by a transaction
I'm waiting on in the middle of a query.
Basically, if I've got a select that's running using
HeapTupleSatisfiesDirty so that I can see uncommitted rows
and I block in the middle for another transaction (waiting
to see if it commits the row I'm looking at) and that
transaction inserts another row that meets my search criteria
am I guaranteed to see that second row in all cases?
Basically for the foreign keys, I'm doing something like the
above, but I'm worried that if the waiting for transaction
does something like:
insert ...
-- At this point the select runs
delete ...
insert ...
that I won't see the last row and I'll let through an update
or delete that should have failed.
From | Date | Subject | |
---|---|---|---|
Next Message | Medi Montaseri | 2002-11-08 18:37:25 | Re: [GENERAL] command |
Previous Message | Tara Piorkowski | 2002-11-08 17:19:16 | Re: [GENERAL] PostgreSQL v7.3b5 Packaged for Testing ... |