pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Álvaro Herrera <alvherre@kurilemu.de>
To: Antonin Houska <ah@cybertec.at>
Cc: Pg Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: splitting src/bin/scripts/vacuumdb.c
Date: Fri, 26 Sep 2025 15:53:39 +0200
Message-ID: <202509261350.nnoidrv2ryaf@alvherre.pgsql> (raw)
In-Reply-To: <48811.1758894395@localhost>

On 2025-Sep-26, Antonin Houska wrote:

> I agree that redundant information makes things more difficult to
> think about. I just wonder if
> 
> 	vacopts->mode != MODE_VACUUM
> 
> should be used instead of
> 
> 	(vacopts->mode == MODE_ANALYZE ||
> 	vacopts->mode == MODE_ANALYZE_IN_STAGES)

I don't think so, because it'd become
   (vacopts->mode != MODE_VACUUM && vacopts->mode != MODE_REPACK)
after we introduce repack, which looks worse.

I considered introducing a simple macro for this usage, something like
#define  ModeIsAnalyze(mode)  (mode == MODE_ANALYZE || mode == MODE_ANALYZE_IN_STAGES)
but thought it'd be overkill.

> Other than that, I checked differences between v21, v22 and v23. I've got no
> other comments worth posting.

Thanks for looking!

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"Pido que me den el Nobel por razones humanitarias" (Nicanor Parra)





view thread (5+ messages)  latest in thread

Message-ID: <202509261350.nnoidrv2ryaf@alvherre.pgsql>
Permalink:  ../202509261350.nnoidrv2ryaf@alvherre.pgsql/
Also on:    postgresql.org/message-id/202509261350.nnoidrv2ryaf@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: alvherre@kurilemu.de, ah@cybertec.at, pgsql-hackers@lists.postgresql.org
  Subject: Re: splitting src/bin/scripts/vacuumdb.c
  In-Reply-To: <202509261350.nnoidrv2ryaf@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox