| From: | Sami Imseih <samimseih(at)gmail(dot)com> |
|---|---|
| To: | Michael Paquier <michael(at)paquier(dot)xyz> |
| Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Remove unused vacuum-truncate-auto injection point |
| Date: | 2026-08-07 22:45:11 |
| Message-ID: | CAA5RZ0smjp0R3ZEtZRcCXHFKBkZ0XRCTu-XwkHVAqqZYqvJX4A@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> > This looks like an oversight from 661643dedad, perhaps to mirror
> > index_cleanup?
> >
> > ```
> > if (params.index_cleanup == VACOPTVALUE_AUTO)
> > INJECTION_POINT("vacuum-index-cleanup-auto", NULL);
> > ```
> >
> > Small cleanup attached.
>
> I am pretty sure that I have defined this one to be able to track more
> easily an inconsistency if someone reworks this code, so as it becomes
> possible to see if the value is set to "auto" when crossing this code
> path, or at least consider if this is a good idea when doing an index
> cleanup.
To be clear, I am referring to
```
if (params.truncate == VACOPTVALUE_AUTO)
INJECTION_POINT("vacuum-truncate-auto", NULL);
```
truncate can never be auto, and is asserted in vacuumlazy.c
```
Assert(params->truncate != VACOPTVALUE_UNSPECIFIED &&
params->truncate != VACOPTVALUE_AUTO);
```
> Leaving things as they are now is not that bad, IMO. That's
> just one opinion, I'm fine to be outvoted.
I have no strong opinion, but I just don't see this being useful, and
if we ever make truncate support auto, we will need to update
injection_points/sql/vacuum.sql to use the option.
--
Sami
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Masahiko Sawada | 2026-08-07 23:48:26 | Re: Per-table resync for logical replication subscriptions |
| Previous Message | Michael Paquier | 2026-08-07 22:25:26 | Re: WAL compression setting after PostgreSQL LZ4 default change |