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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-hackers by date

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