Re: Fixes inconsistent behavior in vacuum when it processes multiple relations

shihao zhong <zhong950419@gmail.com>

From: shihao zhong <zhong950419@gmail.com>
To: Junwang Zhao <zhjwpku@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>, Nathan Bossart <nathandbossart@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2025-06-20T15:54:07Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Rationalize handling of VacuumParams

  2. Avoid scribbling of VACUUM options

Attachments

>> It's a bit odd that we have both `VacuumParams *params` and
>> `struct VacuumParams *params`.

Thanks for pointing that out, the attached new version fixed that.

>> I'd suggest just marking the VacuumParams *params with const...

I initially considered that approach. However, the current code path
for vacuum_rel handles table option re-consolidation, rather than the
ExecVacuum caller. This would require moving all parameter checks into
ExecVacuum, which I'm not sure is ideal. For this patch, let's focus
on resolving the inconsistent behavior. We can discuss parameter
re-consolidation further in this thread:
https://postgr.es/m/aFRxC1W_kZU9OjJ9%40nathan