]> granicus.if.org Git - postgresql/commit
Fix corner case in cleanup of transactions using SSI.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 18 Jan 2012 15:09:44 +0000 (17:09 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 18 Jan 2012 15:12:58 +0000 (17:12 +0200)
commit02f377dbe50074a7016f4a476a8d15d294cd0874
tree8e768e1a7bde8cc0fac1b4a8f35d2b3118d061bc
parentef007e67022bf7f2367aa10fd226d6fb86b6fb9c
Fix corner case in cleanup of transactions using SSI.

When the only remaining active transactions are READ ONLY, we do a "partial
cleanup" of committed transactions because certain types of conflicts
aren't possible anymore. For committed r/w transactions, we release the
SIREAD locks but keep the SERIALIZABLEXACT. However, for committed r/o
transactions, we can go further and release the SERIALIZABLEXACT too. The
problem was with the latter case: we were returning the SERIALIZABLEXACT to
the free list without removing it from the finished list.

The only real change in the patch is the SHMQueueDelete line, but I also
reworked some of the surrounding code to make it obvious that r/o and r/w
transactions are handled differently -- the existing code felt a bit too
clever.

Dan Ports
src/backend/storage/lmgr/predicate.c