Question about MVCC-unsafe commands

Поиск
Список
Период
Сортировка
От Antonin Houska
Тема Question about MVCC-unsafe commands
Дата
Msg-id 18172.1471961425@localhost
обсуждение исходный текст
Ответы Re: Question about MVCC-unsafe commands  (Robert Haas <robertmhaas@gmail.com>)
Список 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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: "Some tests to cover hash_index"
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [PATCH] Transaction traceability - txid_status(bigint)