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 ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings