> > 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


Reply via email to