allowing VACUUM to be cancelled for conflicting locks

Поиск
Список
Период
Сортировка
От Abhijit Menon-Sen
Тема allowing VACUUM to be cancelled for conflicting locks
Дата
Msg-id 20140428101519.GA29392@toroid.org
обсуждение исходный текст
Ответы Re: allowing VACUUM to be cancelled for conflicting locks  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi.

In the past, we've had situations where "everything is hung" turned out
to be because of a script that ran manual VACUUM that was holding some
lock. It's admittedly not a huge problem, but it might be useful if a
manual VACUUM could be cancelled the way autovacuum can be.

One way to do this would be to add an "allow_vacuum_cancel" GUC that, if
set, would cause VACUUM to set the (suitably renamed) PROC_IS_AUTOVACUUM
flag on its own process. Another would be to add an extra option to the
VACUUM command that enables this behaviour.

The former has the advantage of being backwards-compatible with existing
scripts that run manual VACUUM. The latter is arguably nicer.

Any thoughts?

-- Abhijit



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Decrease MAX_BACKENDS to 2^16
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Decrease MAX_BACKENDS to 2^16