aboutsummaryrefslogtreecommitdiff
path: root/src/bin/scripts/createuser.c
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2013-12-18 13:31:27 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2013-12-18 13:45:51 -0300
commit11ac4c73cb89551d7e0d0180b58d82186f072f8d (patch)
tree3c8cde4210159a14bfd4aae873da186cd3a342a5 /src/bin/scripts/createuser.c
parent65d6e4cb5c62371dae6c236a7e709d503ae6ddf8 (diff)
downloadpostgresql-11ac4c73cb89551d7e0d0180b58d82186f072f8d.tar.gz
postgresql-11ac4c73cb89551d7e0d0180b58d82186f072f8d.zip
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 0ac5ad5134f 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
Diffstat (limited to 'src/bin/scripts/createuser.c')
0 files changed, 0 insertions, 0 deletions