Re: vacuumdb changes for stats import/export

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: John Naylor <johncnaylorls(at)gmail(dot)com>
Cc: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Jeff Davis <pgsql(at)j-davis(dot)com>, Corey Huinker <corey(dot)huinker(at)gmail(dot)com>, jian he <jian(dot)universality(at)gmail(dot)com>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Magnus Hagander <magnus(at)hagander(dot)net>, Stephen Frost <sfrost(at)snowman(dot)net>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, alvherre(at)alvh(dot)no-ip(dot)org
Subject: Re: vacuumdb changes for stats import/export
Date: 2025-03-03 16:21:37
Message-ID: Z8XXEYfbSatGrrty@nathan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Mar 03, 2025 at 05:58:43PM +0700, John Naylor wrote:
> On Sat, Mar 1, 2025 at 3:42 AM Nathan Bossart <nathandbossart(at)gmail(dot)com> wrote:
>> On Thu, Feb 27, 2025 at 04:36:04PM +0700, John Naylor wrote:
>> > I had to read it several times before I noticed the difference between
>> > "* found_objs" and "*found_objs". Maybe some extra spacing and breaks
>> > would help, or other reorganization.
>>
>> Yeah, it's pretty atrocious. I think the main problem is that the
>> interface is just too complicated, so I'll take a step back and see if I
>> can make it more understandable to humans.
>
> The interface is awkward, but on the other hand only a small part has
> to really know about it. It's worth trying to make it more readable if
> you can.

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.

>> In the meantime, here's an attempt at adjusting the comment:
>
> 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.

--
nathan

Attachment Content-Type Size
v3-0001-vacuumdb-Save-catalog-query-results-for-analyze-i.patch text/plain 13.9 KB
v3-0002-vacuumdb-Add-option-for-analyzing-only-relations-.patch text/plain 13.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2025-03-03 16:33:37 Re: PATCH: warn about, and deprecate, clear text passwords
Previous Message Tom Lane 2025-03-03 16:18:46 Re: bug when apply fast default mechanism for adding new column over domain with default value