| From: | Michael Paquier <michael(at)paquier(dot)xyz> |
|---|---|
| To: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
| Cc: | Andres Freund <andres(at)anarazel(dot)de>, 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-26 23:03:30 |
| Message-ID: | acW7Qg1fjPeaKqeF@paquier.xyz |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bharath Rupireddy | 2026-03-26 23:05:40 | Re: LockHasWaiters() crashes on fast-path locks |
| Previous Message | Michael Paquier | 2026-03-26 22:54:02 | Re: [PATCH v1] Fix typos in pg_bsd_indent: "dont" -> "don't" in comments Anexo: o arquivo |