| From: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
|---|---|
| To: | Andres Freund <andres(at)anarazel(dot)de> |
| Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, shihao zhong <zhong950419(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Fixes inconsistent behavior in vacuum when it processes multiple relations |
| Date: | 2026-03-24 21:47:30 |
| Message-ID: | acMGcoUwA9CiPPU1@nathan |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, Mar 20, 2026 at 04:32:48PM -0400, Andres Freund wrote:
> 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.
Here is a first try.
--
nathan
| Attachment | Content-Type | Size |
|---|---|---|
| v1-0001-avoid-including-vacuum.h-in-tableam.h-and-heapam..patch | text/plain | 35.1 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andres Freund | 2026-03-24 21:56:39 | Re: Change default of jit to off |
| Previous Message | Bharath Rupireddy | 2026-03-24 21:42:45 | Re: Introduce XID age based replication slot invalidation |