Re: Allowing VACUUM to time out when waiting for locks? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Allowing VACUUM to time out when waiting for locks?
Date
Msg-id 3755.1107014033@sss.pgh.pa.us
Whole thread Raw
In response to Allowing VACUUM to time out when waiting for locks?  (Philip Warner <pjw@rhyme.com.au>)
Responses Re: Allowing VACUUM to time out when waiting for  (Philip Warner <pjw@rhyme.com.au>)
List 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 by date:

Previous
From: Robert Treat
Date:
Subject: Re: [pgsql-hackers] Patent issues and 8.1
Next
From: Tom Lane
Date:
Subject: Re: Implementing Bitmap Indexes