Re: Recalculating OldestXmin in a long-running vacuum - Mailing list pgsql-patches

From Heikki Linnakangas
Subject Re: Recalculating OldestXmin in a long-running vacuum
Date
Msg-id 45DEDAE8.8020806@enterprisedb.com
Whole thread Raw
In response to Re: Recalculating OldestXmin in a long-running vacuum  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: Recalculating OldestXmin in a long-running vacuum
List pgsql-patches
Alvaro Herrera wrote:
> I'm wondering if there has been any effort to make this work in
> conjunction with ITAGAKI Takahiro's patch to correct the dead tuple
> count estimate.

I just looked at that patch. If we applied both patches, the dead_tuples
estimate would be off by the number of dead tuples removed thanks to my
patch.

In vacuum, we could count separately the tuples that were vacuumable
according to the first snapshot, and tuples that were vacuumable
according to a new snapshot. We could then get an estimate that's as
good as with just Takahiro's patch with this formula:

new_n_dead_tuples = n_dead_tuples_at_end - (n_dead_tuples_at_start +
tuples_removed_thanks_to_new_snapshot)

--
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

pgsql-patches by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: [HACKERS] HOT WIP Patch - version 2
Next
From: Zdenek Kotala
Date:
Subject: Re: [BUGS] BUG #2969: Inaccuracies in Solaris FAQ