Re: Interesting glitch in autovacuum - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Interesting glitch in autovacuum
Date
Msg-id 2594.1221069431@sss.pgh.pa.us
Whole thread Raw
In response to Re: Interesting glitch in autovacuum  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: Interesting glitch in autovacuum  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Tom Lane wrote:
>> I'm worried about keeping RecentGlobalXmin up to date during the
>> vacuums, not only at the end, because it will be used for HOT page
>> pruning during the vacuums.

> Oh, I see.  I didn't know we were doing HOT pruning during vacuum; does
> it make sense?

Sorry, I got a bit confused there.  The vacuum's intentional pruning
will use its own OldestXmin variable, which is known current at the
start of the vacuum (and I think there were even proposals to advance
it more frequently than that).  However, a vacuum could require some
incidental system catalog fetches, which I think could result in
prune operations based on RecentGlobalXmin on the catalog pages
(cf index_getnext).

So it's probably not too terribly important ... as long as an autovac
worker doesn't live long enough that its RecentGlobalXmin threatens
to wrap around ... but I'm still interested in it as a code cleanup
measure.  Skipping the transaction snapshot fetch was a performance
kluge, and if we don't need it any more I'd like to get rid of that
distinction between full and lazy vacuum behavior.

Anyway I think we are on the same page about the rest of the issues.
Did you want to work on fixing them, or shall I?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Interesting glitch in autovacuum
Next
From: Heikki Linnakangas
Date:
Subject: Re: Interesting glitch in autovacuum