postgresql/src/backend
Alvaro Herrera db1014bc46 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:31:27 -03:00
..
access Don't ignore tuple locks propagated by our updates 2013-12-18 13:31:27 -03:00
bootstrap Prevent memory leaks from accumulating across printtup() calls. 2013-11-03 11:33:09 -05:00
catalog Don't fail for bad GUCs in CREATE FUNCTION with check_function_bodies off. 2013-09-03 18:32:23 -04:00
commands Rework tuple freezing protocol 2013-12-16 11:29:51 -03:00
executor Prevent display of dropped columns in row constraint violation messages. 2013-11-07 14:41:39 -05:00
foreign Arrange to cache FdwRoutine structs in foreign tables' relcache entries. 2013-03-06 23:48:09 -05:00
lib Reset the binary heap in MergeAppend rescans. 2013-08-30 19:15:32 -04:00
libpq Clear retry flags properly in replacement OpenSSL sock_write function. 2013-12-05 12:48:31 -05:00
main pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
nodes Fix incorrect loop counts in tidbitmap.c. 2013-11-15 18:34:21 -05:00
optimizer Fix inherited UPDATE/DELETE with UNION ALL subqueries. 2013-12-14 17:33:56 -05:00
parser Fix crash in assign_collations_walker for EXISTS with empty SELECT list. 2013-12-02 20:28:49 -05:00
po Translation updates 2013-12-02 00:09:43 -05:00
port Message style improvements 2013-08-07 22:53:50 -04:00
postmaster Fix assorted race conditions in the new timeout infrastructure. 2013-11-29 16:41:03 -05:00
regex Fix regex match failures for backrefs combined with non-greedy quantifiers. 2013-07-18 21:22:43 -04:00
replication Don't crash when pg_xlog is empty and pg_basebackup -x is used 2013-08-24 17:14:18 +02:00
rewrite Fix breakage of MV column name list usage. 2013-11-04 14:45:18 -06:00
snowball Update copyrights for 2013 2013-01-01 17:15:01 -05:00
storage Add HOLD/RESUME_INTERRUPTS in HandleCatchupInterrupt/HandleNotifyInterrupt. 2013-12-13 14:05:16 -05:00
tcop Fix assorted race conditions in the new timeout infrastructure. 2013-11-29 16:41:03 -05:00
tsearch pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
utils Don't ignore tuple locks propagated by our updates 2013-12-18 13:31:27 -03:00
.gitignore Add gitignore for mingw/cygwin build outputs 2011-06-09 18:11:47 +02:00
common.mk Call check_keywords.pl in maintainer-check 2012-02-27 13:53:12 +02:00
Makefile Move relpath() to libpgcommon 2013-02-21 22:46:17 -03:00
nls.mk Add libpgcommon to backend gettext source files 2013-10-21 06:20:05 -04:00