]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Doc: clarify locking requirements for ALTER TABLE ADD FOREIGN KEY.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 10 Apr 2020 17:12:58 +0000 (13:12 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 10 Apr 2020 17:12:58 +0000 (13:12 -0400)
commit1d676ffd41be443d0c7a715f3e03841430ba4a2b
tree2987e717282434cbb110aca6776a7b1e4ce2b17f
parent89e54113416018ad5fadeeca8e009a2e1dc233cd
Doc: clarify locking requirements for ALTER TABLE ADD FOREIGN KEY.

The docs explained that a SHARE ROW EXCLUSIVE lock is needed on the
referenced table, but failed to say the same about the table being
altered.  Since the page says that ACCESS EXCLUSIVE lock is taken
unless otherwise stated, this left readers with the wrong conclusion.

Discussion: https://postgr.es/m/834603375.3470346.1586482852542@mail.yahoo.com
doc/src/sgml/ref/alter_table.sgml