Re: Is the "ACCESS EXCLUSIVE" lock for TRUNCATE really necessary?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Is the "ACCESS EXCLUSIVE" lock for TRUNCATE really necessary?
Дата
Msg-id 6032.1141694905@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Is the "ACCESS EXCLUSIVE" lock for TRUNCATE really necessary?  ("Florian G. Pflug" <fgp@phlo.org>)
Список pgsql-general
"Florian G. Pflug" <fgp@phlo.org> writes:
> Now, I was thinking if TRUNCATE couldn't just let relfilenode in
> pg_class point to a new datafile, and leave the old one in place.

Until when?  How would you synchronize the switchover?

> VACUUM could then remove datafiles when it purges a record from pg_class.

And how would you prevent VACUUM from doing so incorrectly?  The fact
that pg_class contains a dead record is not ordinarily an indication
that the relfilenode mentioned in the record is not needed anymore.

            regards, tom lane

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

Предыдущее
От: "Florian G. Pflug"
Дата:
Сообщение: Re: Is the "ACCESS EXCLUSIVE" lock for TRUNCATE really
Следующее
От: Chris
Дата:
Сообщение: Re: Question about the contrib rpm ?