aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2012-11-30 13:55:55 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2012-11-30 13:55:55 -0500
commitda63fec7dbb0c459aa0f8753a3d30a3a6cd3d73f (patch)
treee698a266b9f45ce05f3ba8aa1b5c1a0ae9ac7af7 /src/test
parentabece8af179f18af3b877220d83f743127ee1aa6 (diff)
downloadpostgresql-da63fec7dbb0c459aa0f8753a3d30a3a6cd3d73f.tar.gz
postgresql-da63fec7dbb0c459aa0f8753a3d30a3a6cd3d73f.zip
Add missing buffer lock acquisition in GetTupleForTrigger().
If we had not been holding buffer pin continuously since the tuple was initially fetched by the UPDATE or DELETE query, it would be possible for VACUUM or a page-prune operation to move the tuple while we're trying to copy it. This would result in a garbage "old" tuple value being passed to an AFTER ROW UPDATE or AFTER ROW DELETE trigger. The preconditions for this are somewhat improbable, and the timing constraints are very tight; so it's not so surprising that this hasn't been reported from the field, even though the bug has been there a long time. Problem found by Andres Freund. Back-patch to all active branches.
Diffstat (limited to 'src/test')
0 files changed, 0 insertions, 0 deletions