Re: Allowing VACUUM to time out when waiting for locks?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Allowing VACUUM to time out when waiting for locks?
Дата
Msg-id 3755.1107014033@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Allowing VACUUM to time out when waiting for locks?  (Philip Warner <pjw@rhyme.com.au>)
Ответы Re: Allowing VACUUM to time out when waiting for  (Philip Warner <pjw@rhyme.com.au>)
Список pgsql-hackers
Philip Warner <pjw@rhyme.com.au> writes:
> We have a frequently updated (peak > 5/sec) table with about 1000 rows.
> We run VACCUM FULL on this table every 5 minutes.

I agree with Bruno's comment that you shouldn't be doing that in the
first place.  Plain vacuum (perhaps executed even more often, like
once a minute) will cause fewer locking headaches.

> Is it possible to set up a vacuum to fail if a lock is not granted in
> a limited period of time (eg. 1 minute)?

I think you could do that by setting a statement timeout.
        regards, tom lane


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

Предыдущее
От: Robert Treat
Дата:
Сообщение: Re: [pgsql-hackers] Patent issues and 8.1
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Implementing Bitmap Indexes