Re: vacuumdb changes for stats import/export

John Naylor <johncnaylorls@gmail.com>

From: John Naylor <johncnaylorls@gmail.com>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>, Bruce Momjian <bruce@momjian.us>, Jeff Davis <pgsql@j-davis.com>, Corey Huinker <corey.huinker@gmail.com>, jian he <jian.universality@gmail.com>, Matthias van de Meent <boekewurm+postgres@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Magnus Hagander <magnus@hagander.net>, Stephen Frost <sfrost@snowman.net>, Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>, Peter Smith <smithpb2250@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, alvherre@alvh.no-ip.org
Date: 2025-03-04T06:05:17Z
Lists: pgsql-hackers
On Mon, Mar 3, 2025 at 11:21 PM Nathan Bossart <nathandbossart@gmail.com> wrote:
>
> On Mon, Mar 03, 2025 at 05:58:43PM +0700, John Naylor wrote:
> True.  One small thing we could do is to require "found_objs" (the double
> pointer) to always be non-NULL, but that just compels some callers to
> provide otherwise-unused variables.  I've left the interface alone for now.

One thing to consider is that a pointer named "dummy" is self-documenting.

> > That's better, and if we end up with this interface, we'll want quotes
> > around the names so the eye can tell where the "*" belong.
>
> I did that in v3.  I also tried to break up this comment into bullet points
> for better separation and logical flow.

That's much easier to follow, thanks.

-- 
John Naylor
Amazon Web Services



Commits

  1. doc: Adjust documentation for vacuumdb --missing-stats-only.

  2. Update guidance for running vacuumdb after pg_upgrade.

  3. vacuumdb: Add option for analyzing only relations missing stats.

  4. vacuumdb: Teach vacuum_one_database() to reuse query results.