postgresql/src/backend/utils
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
..
adt Rename TABLE() to ROWS FROM(). 2013-12-10 09:34:37 -05:00
cache Mark variables 'static' where possible. Move GinFuzzySearchLimit to ginget.c 2013-12-16 11:41:17 +02:00
error Avoid out-of-bounds read in errfinish if error_stack_depth < 0. 2013-12-02 10:42:01 -05:00
fmgr Use appendStringInfoString instead of appendStringInfo where possible. 2013-10-31 10:55:59 -04:00
hash pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
init Mark variables 'static' where possible. Move GinFuzzySearchLimit to ginget.c 2013-12-16 11:41:17 +02:00
mb Add checks for valid multibyte character length in UtfToLocal, LocalToUtf. 2013-07-18 21:55:38 -04:00
misc Add ALTER SYSTEM command to edit the server configuration file. 2013-12-18 23:42:44 +09:00
mmgr Get rid of use of asprintf() in favor of a more portable implementation. 2013-10-22 18:42:13 -04:00
resowner Fix details missed by dynamic shared memory patch. 2013-10-14 08:00:26 -04:00
sort Ensure 64bit arithmetic when calculating tapeSpace 2013-07-14 16:26:16 -04:00
time Don't ignore tuple locks propagated by our updates 2013-12-18 13:45:51 -03:00
.gitignore Avoid maintaining three separate copies of the error codes list. 2011-02-03 22:32:49 -05:00
Gen_dummy_probes.sed Update copyrights for 2013 2013-01-01 17:15:01 -05:00
Gen_fmgrtab.pl Update copyrights for 2013 2013-01-01 17:15:01 -05:00
Makefile Make handling of errcodes.h more consistent with other generated headers. 2011-02-04 09:29:10 -05:00
errcodes.txt Update copyrights for 2013 2013-01-01 17:15:01 -05:00
generate-errcodes.pl Update copyrights for 2013 2013-01-01 17:15:01 -05:00
probes.d Update copyrights for 2013 2013-01-01 17:15:01 -05:00