Re: Missing CONCURRENT VACUUM (Was: Release notes for - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: Missing CONCURRENT VACUUM (Was: Release notes for
Date
Msg-id 1124662470.4857.22.camel@fuji.krosing.net
Whole thread Raw
In response to Missing CONCURRENT VACUUM (Was: Release notes for 8.1)  (Hannu Krosing <hannu@skype.net>)
Responses Re: Missing CONCURRENT VACUUM (Was: Release notes for  (Hannu Krosing <hannu@tm.ee>)
List pgsql-hackers
On E, 2005-08-22 at 00:36 +0300, Hannu Krosing wrote:
> On K, 2005-08-17 at 14:48 -0400, Tom Lane wrote:
> > Hannu Krosing <hannu@skype.net> writes:
> > > Please check the actual patch and advise if anything is still missing.
> > 
> > While testing this I realized that it does not in fact work as
> > advertised.  It will only exclude long-running VACUUMs from other
> > VACUUMs' OldestXmin if *all* the transactions in the system are lazy
> > VACUUMs.  If there is even one regular transaction in the system,
> > that transaction will include the VACUUMs in its MyProc->xmin, and
> > thence GetOldestXmin will have to include them in its result.
> 
> Thanks for spotting it. I guess in my case it was performing more or
> less as expected due to my load fluctuating between 0 and 300 concurrent
> transaction each minute, so the vacuum hit the 0 point often enough to
> be useful. I am running it in a loop, with 15 sec sleep between each
> vacuum.
> 
> > AFAICS the only way to fix this would be to exclude inVacuum
> > transactions from GetSnapshotData's calculations as well. 
> 
> I fixed this in a more local way by adding an extra "xmin" to proc for
> transactions where inVacuum is false (proc->nonInVacuumXmin) which is
> calculated together with proc->xmin.

Somehow this still did not fix the issue of getting the xmin of long
vacuum through concurrent transactions.

My initial testing was wrong.

Probably you should ignore the whole thing until I figure out why this
does not work ...

-- 
Hannu Krosing <hannu@tm.ee>


pgsql-hackers by date:

Previous
From: "Dave Page"
Date:
Subject: Re: Sleep functions
Next
From: Hannu Krosing
Date:
Subject: Re: Missing CONCURRENT VACUUM (Was: Release notes for