postgresql/src/backend/access
Alvaro Herrera 11ac4c73cb Don't ignore tuple locks propagated by our updates
If a tuple was locked by transaction A, and transaction B updated it,
the new version of the tuple created by B would be locked by A, yet
visible only to B; due to an oversight in HeapTupleSatisfiesUpdate, the
lock held by A wouldn't get checked if transaction B later deleted (or
key-updated) the new version of the tuple.  This might cause referential
integrity checks to give false positives (that is, allow deletes that
should have been rejected).

This is an easy oversight to have made, because prior to improved tuple
locks in commit 0ac5ad5134 it wasn't possible to have tuples created by
our own transaction that were also locked by remote transactions, and so
locks weren't even considered in that code path.

It is recommended that foreign keys be rechecked manually in bulk after
installing this update, in case some referenced rows are missing with
some referencing row remaining.

Per bug reported by Daniel Wood in
CAPweHKe5QQ1747X2c0tA=5zf4YnS2xcvGf13Opd-1Mq24rF1cQ@mail.gmail.com
2013-12-18 13:45:51 -03:00
..
common Add a new reloption, user_catalog_table. 2013-12-10 19:17:34 -05:00
gin Mark variables 'static' where possible. Move GinFuzzySearchLimit to ginget.c 2013-12-16 11:41:17 +02:00
gist Don't include unused space in LOG_NEWPAGE records. 2013-12-04 00:10:47 +02:00
hash Consistently use unsigned arithmetic for alignment calculations. 2013-10-20 21:04:52 -04:00
heap Rework tuple freezing protocol 2013-12-16 11:29:50 -03:00
index Use InvalidSnapshot, now SnapshotNow, as the default snapshot. 2013-07-23 10:58:32 -04:00
nbtree Don't include unused space in LOG_NEWPAGE records. 2013-12-04 00:10:47 +02:00
rmgrdesc Rework tuple freezing protocol 2013-12-16 11:29:50 -03:00
spgist Don't include unused space in LOG_NEWPAGE records. 2013-12-04 00:10:47 +02:00
transam Don't ignore tuple locks propagated by our updates 2013-12-18 13:45:51 -03:00
Makefile Split out rmgr rm_desc functions into their own files 2012-11-28 13:01:15 -03:00