Skip site navigation (1) Skip section navigation (2)

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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Allowing VACUUM to time out when waiting for locks?
Date: 2005-01-29 15:53:53
Message-ID: 3755.1107014033@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Philip Warner <pjw(at)rhyme(dot)com(dot)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

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2005-01-29 16:22:51
Subject: Re: Implementing Bitmap Indexes
Previous:From: Bruno Wolff IIIDate: 2005-01-29 14:59:57
Subject: Re: Allowing VACUUM to time out when waiting for locks?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group