Re: Nonrandom scanned_pages distorts pg_class.reltuples set by VACUUM

Peter Geoghegan <pg@bowt.ie>

From: Peter Geoghegan <pg@bowt.ie>
To: Andres Freund <andres@anarazel.de>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2022-02-18T00:20:38Z
Lists: pgsql-hackers
On Thu, Feb 17, 2022 at 4:18 PM Andres Freund <andres@anarazel.de> wrote:
> > What substantial changes are you referring to? The one thing that did
> > change was the commit message, which framed everything in terms of the
> > later work. It really is true that the patch that I committed was
> > essentially the same patch as the one posted on November 22, in both
> > style and substance. Before I really even began to think about the
> > freezing stuff. This is a matter of record.
>
> Here I was referencing your description of how the patch started ("purely as
> refactoring work"), and then evolved into something not just a refactoring.

Of course.

> If helpful I can give a go at showing how I think it could be split up. Or
> perhaps more productively, do that on a not-yet-committed larger patch.

Any help is appreciated.

-- 
Peter Geoghegan



Commits

  1. Avoid VACUUM reltuples distortion.

  2. Simplify lazy_scan_heap's handling of scanned pages.

  3. Avoid having vacuum set reltuples to 0 on non-empty relations in the

  4. Avoid useless truncation attempts during VACUUM.

  5. Fix VACUUM so that it always updates pg_class.reltuples/relpages.