public inbox for [email protected]
help / color / mirror / Atom feedFrom: 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: Thu, 26 Mar 2026 11:22:25 +0900
Message-ID: <[email protected]> (raw)
In-Reply-To: <acQAXPXov4cbyUx0@nathan>
References: <aFrSlSz9fi47j5Sr@nathan>
<[email protected]>
<aFwT31Rw-Oj-bgO9@nathan>
<[email protected]>
<rzxpxod4c4la62yvutyrvgoyilrl2fx55djaf2suidy7np5m6c@3l2ln476eadh>
<ab2iXwhRe3fFNPfp@nathan>
<aglpy2jbnb75vufdx6hqkgokquzmoshcbnuxlcxhum4k7tyi7m@27m4hbxo2u2g>
<acMGcoUwA9CiPPU1@nathan>
<loig4i4hc4vuybn6uv6e2kgqm37sebbzujkrvdf6uhbxq5dsfm@7wbkmucts3eu>
<acQAXPXov4cbyUx0@nathan>
On Wed, Mar 25, 2026 at 10:33:48AM -0500, Nathan Bossart wrote:
> On Tue, Mar 24, 2026 at 11:29:52PM -0400, Andres Freund wrote:
> > I wonder if more of the code in the function should be updated to use the
> > copy, otherwise it seems like it could more easily happen that a part of the
> > code not using the modified version is moved until after a modification, and
> > the code author assumes the modifications now have taken effect.
>
> Yeah, I was waffling on this. I updated the rest of the function to use
> params_local instead.
Fine by me with these extra forward declarations and the pointer
manipulations across these VACUUM/ANALYZE calls. That would be
protective enough in terms of the original intention of these const
markers added in 2252fcd4276c.
Once vacuum_rel() has its VacuumParams changed to a pointer, renaming
it to params_local and use params_local in all its code paths looks
sensible. On top of what you are doing, I would add a big warning
comment at the top of the routine to mention that "params" should not
be used directly in the routine. The local copies should be used.
--
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