postgresql/src
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
..
backend Don't ignore tuple locks propagated by our updates 2013-12-18 13:45:51 -03:00
bin Add ALTER SYSTEM command to edit the server configuration file. 2013-12-18 23:42:44 +09:00
common Use improved vsnprintf calling logic in more places. 2013-10-24 21:43:57 -04:00
include Don't ignore tuple locks propagated by our updates 2013-12-18 13:45:51 -03:00
interfaces C comment: again update comment for pg_fe_sendauth for error cases 2013-12-03 11:42:18 -05:00
makefiles Remove leftovers of IRIX port 2013-11-12 06:39:36 -05:00
pl Fix more instances of "the the" in comments. 2013-12-13 20:02:01 +02:00
port Add "SHIFT_JIS" as an accepted encoding name for locale checking. 2013-12-15 11:09:05 +09:00
template Remove leftovers of IRIX port 2013-11-12 06:39:36 -05:00
test Don't ignore tuple locks propagated by our updates 2013-12-18 13:45:51 -03:00
timezone Update time zone data files to tzdata release 2013h. 2013-12-01 14:11:44 -05:00
tools Add new wal_level, logical, sufficient for logical decoding. 2013-12-10 19:01:40 -05:00
tutorial Modernize string literal syntax in tutorial example. 2013-01-19 17:20:32 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
Makefile.global.in build: pass EXTRA_REGRESS_OPTS to secondary regression tests 2013-12-04 10:14:45 -05:00
Makefile.shlib Remove IRIX port. 2013-10-18 08:14:21 -04:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
nls-global.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00