]> granicus.if.org Git - postgresql/commit
Correctly detect SSI conflicts of prepared transactions after crash.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 29 Feb 2012 13:22:49 +0000 (15:22 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 29 Feb 2012 13:42:36 +0000 (15:42 +0200)
commitd6a7271958e61fe8029087a34483437292f41f6f
tree9702977c5a58323701949336036ebeebbb5188ad
parent8cae5810ebaaabb54171d9953bdd9cc802f0d135
Correctly detect SSI conflicts of prepared transactions after crash.

A prepared transaction can get new conflicts in and out after preparing, so
we cannot rely on the in- and out-flags stored in the statefile at prepare-
time. As a quick fix, make the conservative assumption that after a restart,
all prepared transactions are considered to have both in- and out-conflicts.
That can lead to unnecessary rollbacks after a crash, but that shouldn't be
a big problem in practice; you don't want prepared transactions to hang
around for a long time anyway.

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