From: | Antonin Houska <ah(at)cybertec(dot)at> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Question about MVCC-unsafe commands |
Date: | 2016-08-23 14:10:25 |
Message-ID: | 18172.1471961425@localhost |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I'm failing to understand why [1] mentions "table-rewriting forms of ALTER
TABLE" besides TRUNCATE command.
For TRUNCATE it seems clear: if transaction A takes the snapshot before it
accesses the table first time (typically because isolation level is at least
REPEATABLE READ) and transaction B manages to commit TRUNCATE soon enough,
then A sees pg_class entry of the table already affected by B, which has the
new (empty) relfilenode. (The original pg_class entry is no longer visible by
catalog snapshot, nor does it contain valid OID of the original relfilenode.)
But IMO heap rewriting changes neither table contents, nor visibility. Can
anyone explain what I miss?
[1] https://www.postgresql.org/docs/9.6/static/mvcc-caveats.html
--
Antonin Houska
Cybertec Schönig & Schönig GmbH
Gröhrmühlgasse 26
A-2700 Wiener Neustadt
Web: http://www.postgresql-support.de, http://www.cybertec.at
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2016-08-23 14:18:47 | Re: [PATCH] Transaction traceability - txid_status(bigint) |
Previous Message | Robert Haas | 2016-08-23 14:09:11 | Re: "Some tests to cover hash_index" |