Re: lazy vacuum sleeps with exclusive lock on table

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: lazy vacuum sleeps with exclusive lock on table
Date: 2007-07-26 14:13:37
Message-ID: 26498.1185459217@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)commandprompt(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-07-26 14:23:48 Re: Machine available for community use
Previous Message Greg Smith 2007-07-26 13:19:24 Re: Machine available for community use