vacuum after truncate

Поиск
Список
Период
Сортировка
От Mariel Cherkassky
Тема vacuum after truncate
Дата
Msg-id CA+t6e1=Xid-2j562k3J=-WKsYARt0STXBFT9ephcvMUo9NAQbQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: vacuum after truncate  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список pgsql-performance
Hi, I have a big function that includes many truncates on different tables. In the documentation is is written that truncates creates a new file and resign the old filenode to the new filenode and the old file (old data of the table) is deleted in commit. In order to execute my function I run psql -d 'aa' -U 'bb' -C "select function()"; I have a few questions about it ? 1.When I start the function, it means that the whole function is one big transaction right ? 2..Because the truncates I preform are part of a transaction it means that only at the end of the transaction that space will be freed ? Which mean only when the function is finished? 3..Does running vacuum at the end of the function on the tables that were truncated and then populated with data will have any impact or is it better just to analyze them ? Thanks.

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

Предыдущее
От: Jeff Janes
Дата:
Сообщение: Re: Bitmap scan is undercosted? - boolean correlation
Следующее
От: Laurenz Albe
Дата:
Сообщение: Re: vacuum after truncate