Re: VACUUM Improvements - WIP Patch - Mailing list pgsql-patches

From Tom Lane
Subject Re: VACUUM Improvements - WIP Patch
Date
Msg-id 21751.1215883933@sss.pgh.pa.us
Whole thread Raw
In response to VACUUM Improvements - WIP Patch  ("Pavan Deolasee" <pavan.deolasee@gmail.com>)
List pgsql-patches
"Pavan Deolasee" <pavan.deolasee@gmail.com> writes:
> Here is a WIP patch based on the discussions here:
> http://archives.postgresql.org/pgsql-hackers/2008-05/msg00863.php

I do not like this patch in any way, shape, or form.

(1) It's enormously overcomplicated, and therefore fragile.

(2) It achieves speedup of VACUUM by pushing work onto subsequent
regular accesses of the page, which is exactly the wrong thing.
Worse, once you count the disk writes those accesses will induce it's
not even clear that there's any genuine savings.

(3) The fact that it doesn't work until concurrent transactions have
gone away makes it of extremely dubious value in real-world scenarios,
as already noted by Simon.


It strikes me that what you are trying to do here is compensate for
a bad decision in the HOT patch, which was to have VACUUM's first
pass prune/defrag a page even when we know we are going to have to
come back to that page later.  What about trying to fix things so
that if the page contains line pointers that need to be removed,
the first pass doesn't dirty it at all, but leaves all the work
to be done at the second visit?  I think that since heap_page_prune
has been refactored into a "scan" followed by an "apply", it'd be
possible to decide before the "apply" step whether this is the case
or not.

            regards, tom lane

pgsql-patches by date:

Previous
From: Teodor Sigaev
Date:
Subject: Re: [HACKERS] GIN improvements
Next
From: Tom Lane
Date:
Subject: Re: Relation forks & FSM rewrite patches