From: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
---|---|
To: | Gregory Stark <stark(at)enterprisedb(dot)com> |
Cc: | Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>, Postgres - Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Avoiding second heap scan in VACUUM |
Date: | 2008-05-28 21:20:39 |
Message-ID: | 1212009639.4489.679.camel@ebony.site |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, 2008-05-28 at 16:55 -0400, Gregory Stark wrote:
> "Simon Riggs" <simon(at)2ndquadrant(dot)com> writes:
>
> > So the idea is to have one pass per VACUUM, but make that one pass do
> > the first pass of *this* VACUUM and the second pass of the *last*
> > VACUUM.
>
> I think that's exactly the same as the original suggestion of having HOT
> pruning do the second pass of the last vacuum. The trick is to know whether
> the last vacuum committed or not. If it didn't commit then it's not safe to
> remove those line pointers yet.
Perhaps, though I'm not suggesting storing extra xids on-block.
I think if we have to wait for a VACUUM to run before marking the line
pointers then we may as well wait for two. Having something wait for a
VACUUM and then removed it by HOT afterwards gives you the worst of both
worlds: long wait for a VACUUM then more overhead and extra code during
HOT pruning.
--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Training, Services and Support
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2008-05-28 21:45:37 | Re: BUG #4204: COPY to table with FK has memory leak |
Previous Message | Gregory Stark | 2008-05-28 20:55:34 | Re: Avoiding second heap scan in VACUUM |