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

From Tom Lane
Subject Re: lazy vacuum sleeps with exclusive lock on table
Date
Msg-id 26498.1185459217@sss.pgh.pa.us
Whole thread Raw
In response to Re: lazy vacuum sleeps with exclusive lock on table  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> I propose applying this patch from 8.1 onwards.  HEAD would get an
> additional treatment to avoid the balancing problem.

If you're going to insert an early unlock, it should be as early as
possible, ie right after the RelationTruncate() call.  The bookkeeping
in between is probably trivial, but why hold the lock for it?

Also, rather than just removing the vacuum_delay_point call, you need
a comment explicitly pointing out why that loop hasn't got one.
Otherwise somebody will think it an oversight and put it back in
someday.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Greg Smith
Date:
Subject: Re: Machine available for community use
Next
From: Tom Lane
Date:
Subject: Re: Machine available for community use