Re: Fixes inconsistent behavior in vacuum when it processes multiple relations - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Fixes inconsistent behavior in vacuum when it processes multiple relations
Date
Msg-id aglpy2jbnb75vufdx6hqkgokquzmoshcbnuxlcxhum4k7tyi7m@27m4hbxo2u2g
Whole thread
In response to Re: Fixes inconsistent behavior in vacuum when it processes multiple relations  (Nathan Bossart <nathandbossart@gmail.com>)
Responses Re: Fixes inconsistent behavior in vacuum when it processes multiple relations
List pgsql-hackers
Hi,

On 2026-03-20 14:39:11 -0500, Nathan Bossart wrote:
> On Fri, Mar 20, 2026 at 12:27:49PM -0400, Andres Freund wrote:
> > Why wasn't it enough to add const markers and keep passing by pointer?
> 
> IIRC the idea was to prevent similar problems in the future.

Seems using const VacuumParams *params should suffice for that? I don't think
it's particularly likely that we'll accept code that casts the const away and
then later get hurt by that.


> To avoid the extra #includes, we could instead use the back-patched version
> (e.g., commit 661643deda).

I'd probably not go quite there, at least the params should largely be const,
with a local on-stack copy where we do need to modify.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: another autovacuum scheduling thread
Next
From: Zsolt Parragi
Date:
Subject: Re: pg_get__*_ddl consolidation