]> granicus.if.org Git - postgresql/commit
TransferPredicateLocksToNewTarget should initialize a new lock
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 11 Apr 2011 10:46:37 +0000 (13:46 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 11 Apr 2011 10:46:37 +0000 (13:46 +0300)
commitdad1f4638235e5ff5696b948b88ba24cd99b415e
tree14cc56ed506ad0e28df1cf93de2ab4c9653b332e
parent7c797e7194d969f974abf579cacf30ffdccdbb95
TransferPredicateLocksToNewTarget should initialize a new lock
entry's commitSeqNo to that of the old one being transferred, or take
the minimum commitSeqNo if it is merging two lock entries.

Also, CreatePredicateLock should initialize commitSeqNo for to
InvalidSerCommitSeqNo instead of to 0. (I don't think using 0 would
actually affect anything, but we should be consistent.)

I also added a couple of assertions I used to track this down: a
lock's commitSeqNo should never be zero, and it should be
InvalidSerCommitSeqNo if and only if the lock is not held by
OldCommittedSxact.

Dan Ports, to fix leak of predicate locks reported by YAMAMOTO Takashi.
src/backend/storage/lmgr/predicate.c