]> granicus.if.org Git - postgresql/commit
Improve documentation about MVCC-unsafe utility commands.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 15 Aug 2015 17:30:16 +0000 (13:30 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 15 Aug 2015 17:30:16 +0000 (13:30 -0400)
commitec2bc39e8910d05e27794e5095b7b8daed981406
tree193aec3b4834ef26527e4dc54cf081f72fe077cd
parent9d6af7367e7b079c021c285f03128bad531b667e
Improve documentation about MVCC-unsafe utility commands.

The table-rewriting forms of ALTER TABLE are MVCC-unsafe, in much the same
way as TRUNCATE, because they replace all rows of the table with newly-made
rows with a new xmin.  (Ideally, concurrent transactions with old snapshots
would continue to see the old table contents, but the data is not there
anymore --- and if it were there, it would be inconsistent with the table's
updated rowtype, so there would be serious implementation problems to fix.)
This was nowhere documented though, and the problem was only documented for
TRUNCATE in a note in the TRUNCATE reference page.  Create a new "Caveats"
section in the MVCC chapter that can be home to this and other limitations
on serializable consistency.

In passing, fix a mistaken statement that VACUUM and CLUSTER would reclaim
space occupied by a dropped column.  They don't reconstruct existing tuples
so they couldn't do that.

Back-patch to all supported branches.
doc/src/sgml/mvcc.sgml
doc/src/sgml/ref/alter_table.sgml
doc/src/sgml/ref/truncate.sgml