Re: BUG #5946: Long exclusive lock taken by vacuum (not full) - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #5946: Long exclusive lock taken by vacuum (not full)
Date
Msg-id 4345.1301066239@sss.pgh.pa.us
Whole thread Raw
In response to BUG #5946: Long exclusive lock taken by vacuum (not full)  ("Maxim Boguk" <Maxim.Boguk@gmail.com>)
Responses Re: BUG #5946: Long exclusive lock taken by vacuum (not full)  (Christopher Browne <cbbrowne@gmail.com>)
Re: BUG #5946: Long exclusive lock taken by vacuum (not full)  (Maxim Boguk <maxim.boguk@gmail.com>)
List pgsql-bugs
"Maxim Boguk" <Maxim.Boguk@gmail.com> writes:
> In my case vacuum tried to truncate last 10-15GB from 100Gb relation, and
> each time (3) it was cost 10+ minutes of service downtime (because that
> table was completely locked).

> Is  that correct behaviour? Are here any way to speedup that process or at
> least allow read-only queries during that time?

Use autovacuum --- if there's something that wants to access the table,
autovac will get kicked off the lock.  (Of course, the table may never
get truncated then, but maybe you don't care.)

            regards, tom lane

pgsql-bugs by date:

Previous
From: Kris Jurka
Date:
Subject: Re: BUG #5948: JDBC wrond insert of timestamp data
Next
From: Tom Lane
Date:
Subject: Re: BUG #5950: backend terminating after altering table