public inbox for [email protected]  
help / color / mirror / Atom feed
From: Michael Paquier <[email protected]>
To: Nathan Bossart <[email protected]>
Cc: Andres Freund <[email protected]>
Cc: shihao zhong <[email protected]>
Cc: PostgreSQL-development <[email protected]>
Subject: Re: Fixes inconsistent behavior in vacuum when it processes multiple relations
Date: Fri, 27 Mar 2026 08:03:30 +0900
Message-ID: <[email protected]> (raw)
In-Reply-To: <acVZ2O0938nWa73w@nathan>
References: <aFwT31Rw-Oj-bgO9@nathan>
	<[email protected]>
	<rzxpxod4c4la62yvutyrvgoyilrl2fx55djaf2suidy7np5m6c@3l2ln476eadh>
	<ab2iXwhRe3fFNPfp@nathan>
	<aglpy2jbnb75vufdx6hqkgokquzmoshcbnuxlcxhum4k7tyi7m@27m4hbxo2u2g>
	<acMGcoUwA9CiPPU1@nathan>
	<loig4i4hc4vuybn6uv6e2kgqm37sebbzujkrvdf6uhbxq5dsfm@7wbkmucts3eu>
	<acQAXPXov4cbyUx0@nathan>
	<[email protected]>
	<acVZ2O0938nWa73w@nathan>

On Thu, Mar 26, 2026 at 11:07:52AM -0500, Nathan Bossart wrote:
> Wait...  Can't we just pass params by value only to vacuum_rel()?  Doesn't
> this accomplish what we need?

It would accomplish Andres's goal of avoiding a deeper inclusion of
vacuum.h in src/include/.

Still, I slightly prefer your v2, where the interface of vacuum_rel()
is leaner with all the other ones.  It comes at the cost of copying
the input parameters into a temporary "copy" of VacuumParams, but I
see the fact of marking the input "params" with a const as more
valuable in the long-run, with less temptation to manipulate it
directly especially it is not not marked with a const.  One small
worry with v3 is that people like copy-pasting code around, and I
suspect that v2 could discourage better the patterns that 2252fcd4276c
has tried to improve and that 661643dedad9 had to fix.
--
Michael


Attachments:

  [application/pgp-signature] signature.asc (833B, 2-signature.asc)
  download

view thread (32+ messages)  latest in thread

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: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Fixes inconsistent behavior in vacuum when it processes multiple relations
  In-Reply-To: <[email protected]>

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

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