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

From Tom Lane
Subject Re: Missing CONCURRENT VACUUM (Was: Release notes for
Date
Msg-id 5302.1124304489@sss.pgh.pa.us
Whole thread Raw
In response to Re: Missing CONCURRENT VACUUM (Was: Release notes for  (Hannu Krosing <hannu@skype.net>)
Responses Re: Missing CONCURRENT VACUUM (Was: Release notes for  (Hannu Krosing <hannu@skype.net>)
List pgsql-hackers
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.

AFAICS the only way to fix this would be to exclude inVacuum
transactions from GetSnapshotData's calculations as well.  That
makes the patch far more invasive, and I'm not confident I can work
out all the implications.  (In particular, the consequences for
TransactionIdIsInProgress look bad.  I don't think we want a VACUUM
to be seen as not-in-progress.)

So I'm bouncing this patch again...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Crash while trying to log in with nonexistent role
Next
From: Dave Cramer
Date:
Subject: Re: pl/Ruby, deprecating plPython and Core