Re: TRUNCATE SERIALIZABLE and frozen COPY
От | Robert Haas |
---|---|
Тема | Re: TRUNCATE SERIALIZABLE and frozen COPY |
Дата | |
Msg-id | CA+TgmoY4D_6X7AGtYU+H54=P0r=jR-n_K=6HeyBzsFbw0TodKA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: TRUNCATE SERIALIZABLE and frozen COPY ("Kevin Grittner" <kgrittn@mail.com>) |
Список | pgsql-hackers |
On Fri, Nov 9, 2012 at 9:22 AM, Kevin Grittner <kgrittn@mail.com> wrote: > (1) Any attempt to read from the truncated table would not block. The > pg_class version included in the transaction's snapshot would > determine which heap and indexes were accessed. Well, the thing is, you can't actually do this. When the transaction commits, we truncate the main forks of the old heap and index and remove all of the supplemental forks. The main forks are finally removed for good at the next checkpoint cycle. To make this work, we'd have to keep around the old heap and index until there were no longer any MVCC snapshots that could see them. That might be useful as an option, but it would need a bunch of additional mechanism, and it doesn't seem desirable as a default behavior because it could defer disk space reclamation indefinitely. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
В списке pgsql-hackers по дате отправления: