postgresql/src/backend
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
..
access Don't ignore tuple locks propagated by our updates 2013-12-18 13:45:51 -03:00
bootstrap Prevent memory leaks from accumulating across printtup() calls. 2013-11-03 11:33:05 -05:00
catalog Add new wal_level, logical, sufficient for logical decoding. 2013-12-10 19:01:40 -05:00
commands Comment: COPY comment improvement 2013-12-17 12:51:16 -05:00
executor Support multi-argument UNNEST(), and TABLE() syntax for multiple functions. 2013-11-21 19:37:20 -05:00
foreign Arrange to cache FdwRoutine structs in foreign tables' relcache entries. 2013-03-06 23:48:09 -05:00
lib Use improved vsnprintf calling logic in more places. 2013-10-24 21:43:57 -04:00
libpq SSL: Support ECDH key exchange 2013-12-07 15:11:44 -05:00
main Renovate display of non-ASCII messages on Windows. 2013-06-26 11:17:33 -04:00
nodes Add ALTER SYSTEM command to edit the server configuration file. 2013-12-18 23:42:44 +09:00
optimizer Fix inherited UPDATE/DELETE with UNION ALL subqueries. 2013-12-14 17:33:53 -05:00
parser Add ALTER SYSTEM command to edit the server configuration file. 2013-12-18 23:42:44 +09:00
po Translation updates 2013-12-02 00:17:07 -05:00
port Remove IRIX port. 2013-10-18 08:14:21 -04:00
postmaster New autovacuum_work_mem parameter 2013-12-12 11:42:39 +00:00
regex Fix regex match failures for backrefs combined with non-greedy quantifiers. 2013-07-18 21:22:37 -04:00
replication Add ALTER SYSTEM command to edit the server configuration file. 2013-12-18 23:42:44 +09:00
rewrite Refine our definition of what constitutes a system relation. 2013-11-28 20:57:20 -05:00
snowball Update copyrights for 2013 2013-01-01 17:15:01 -05:00
storage Mark variables 'static' where possible. Move GinFuzzySearchLimit to ginget.c 2013-12-16 11:41:17 +02:00
tcop Add ALTER SYSTEM command to edit the server configuration file. 2013-12-18 23:42:44 +09: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:45:51 -03:00
.gitignore Add gitignore for mingw/cygwin build outputs 2011-06-09 18:11:47 +02:00
Makefile Move relpath() to libpgcommon 2013-02-21 22:46:17 -03:00
common.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
nls.mk Add libpgcommon to backend gettext source files 2013-10-19 13:49:05 -04:00