Re: lazy vacuum sleeps with exclusive lock on table - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: lazy vacuum sleeps with exclusive lock on table
Date
Msg-id 20070726073004.GB31564@alvh.no-ip.org
Whole thread Raw
In response to Re: lazy vacuum sleeps with exclusive lock on table  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: lazy vacuum sleeps with exclusive lock on table  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Alvaro Herrera wrote:
> Tom Lane wrote:
> > Alvaro Herrera <alvherre@commandprompt.com> writes:
> > > What I'm requesting here is that the sleep in count_nondeletable_pages()
> > > be removed and that change backpatched to 8.2 and 8.1.
> >
> > Are you sure that that is, and always will be, the only sleep in that
> > part of the code path?
>
> It is currently, as far as I can see, the only sleep.  I think we could
> backpatch the removal of that call, and consider changing the
> cost_delay parameters when we acquire the exclusive lock in HEAD.

I noticed that autovacuum can reset VacuumCostDelay to a non-zero value
when the cost balancing code runs.  Of course, we can reset the target
value so that resetting it does not cause a problem.

I propose applying this patch from 8.1 onwards.  HEAD would get an
additional treatment to avoid the balancing problem.

Note that I am releasing the exclusive lock on the table after the
truncate is done.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

Attachment

pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Machine available for community use
Next
From: Gregory Stark
Date:
Subject: Re: Machine available for community use