Re: Can long-running VACUUM be interrupted?

Поиск
Список
Период
Сортировка
От Adrien NAYRAT
Тема Re: Can long-running VACUUM be interrupted?
Дата
Msg-id 039bd8a3-bae5-cdee-e310-b53112f2086f@anayrat.info
обсуждение исходный текст
Ответ на Can long-running VACUUM be interrupted?  (Andrey Zhidenkov <andrey.zhidenkov@gmail.com>)
Список pgsql-admin
On 11/20/18 4:58 AM, Andrey Zhidenkov wrote:
> I have long-running prevent wraparound VACUUM (it has been running for
> 6 days at the moment). The question is: if I interrupt this process in
> some way (restart database, for instance), will it start from the
> beginning? On the one hand, it opens a new transaction at the
> beginning (according to the source code), on the other hand it updates
> some data on the disk (WAL?). It confuses me. Could someone please
> explain me this?
> -
> With best regards, Andrey Zhidenkov
> 

Hi Andrez,

You could interrupt with pg_cancel_backend function, but autovacuum will 
restart after autovacuum_naptime delay (1min by default).

If you are 9.6+, Postgres will be able to skip already frozen row on the 
table, but it will scan all indexes from the beginning.

Why do you want to interrupt? This kind of vacuum is necessary to avoid 
wraparound: 
https://www.postgresql.org/docs/current/routine-vacuuming.html#VACUUM-FOR-WRAPAROUND


Regards,


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

Предыдущее
От: Häfliger Guido
Дата:
Сообщение: AW: logging aql queries only one table or tables of one scheme
Следующее
От: Stéphane KANSCHINE
Дата:
Сообщение: Re: pgadmin4 - session timeout problem in browser