On 2025-Sep-26, Antonin Houska wrote:
> I agree that redundant information makes things more difficult to
> think about. I just wonder if
>
> vacopts->mode != MODE_VACUUM
>
> should be used instead of
>
> (vacopts->mode == MODE_ANALYZE ||
> vacopts->mode == MODE_ANALYZE_IN_STAGES)
I don't think so, because it'd become
(vacopts->mode != MODE_VACUUM && vacopts->mode != MODE_REPACK)
after we introduce repack, which looks worse.
I considered introducing a simple macro for this usage, something like
#define ModeIsAnalyze(mode) (mode == MODE_ANALYZE || mode == MODE_ANALYZE_IN_STAGES)
but thought it'd be overkill.
> Other than that, I checked differences between v21, v22 and v23. I've got no
> other comments worth posting.
Thanks for looking!
--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
"Pido que me den el Nobel por razones humanitarias" (Nicanor Parra)