pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Improve documentation about MVCC-unsafe utility commands.
Date: Sat, 15 Aug 2015 17:30:42 +0000
Message-ID: <E1ZQfI2-0007aP-Ua@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/5869cbfef48fdfa6b8f108c6c395601e8ad27250

Modified Files
--------------
doc/src/sgml/mvcc.sgml            |   46 ++++++++++++++++++++++++++-----------
doc/src/sgml/ref/alter_table.sgml |   21 +++++++++++------
doc/src/sgml/ref/truncate.sgml    |   23 +++++--------------
3 files changed, 52 insertions(+), 38 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


view thread (7+ messages)  latest in thread

Message-ID: <E1ZQfI2-0007aP-Ua@gemulon.postgresql.org>
Permalink:  ../E1ZQfI2-0007aP-Ua@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1ZQfI2-0007aP-Ua@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Improve documentation about MVCC-unsafe utility commands.
  In-Reply-To: <E1ZQfI2-0007aP-Ua@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox