Re: add PROCESS_MAIN to VACUUM - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: add PROCESS_MAIN to VACUUM
Date
Msg-id 20230302065359.GA2140777@nathanxps13
Whole thread Raw
In response to Re: add PROCESS_MAIN to VACUUM  (Michael Paquier <michael@paquier.xyz>)
Responses Re: add PROCESS_MAIN to VACUUM
List pgsql-hackers
On Thu, Mar 02, 2023 at 02:53:02PM +0900, Michael Paquier wrote:
> -   if (params->options & VACOPT_FULL)
> +   if (params->options & VACOPT_FULL &&
> +       params->options & VACOPT_PROCESS_MAIN)
> Perhaps this is a bit under-parenthesized, while reading through it
> once again..

fixed

> 
> +   {
> +       /* we force VACOPT_PROCESS_MAIN so vacuum_rel() processes it */
> +       bool force_opt = ((params->options & VACOPT_PROCESS_MAIN) == 0);
> +
> +       params->options |= VACOPT_PROCESS_MAIN;
>         vacuum_rel(toast_relid, NULL, params, true);
> +       if (force_opt)
> +           params->options &= ~VACOPT_PROCESS_MAIN;
> Zigzagging with the centralized VacuumParams is a bit inelegant.
> Perhaps it would be neater to copy VacuumParams and append
> VACOPT_PROCESS_MAIN on the copy?

done

> An extra question: should we check the behavior of the commands when
> applying a list of relations to VACUUM?

I don't feel a strong need for that, especially now that we aren't
modifying params anymore.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com

Attachment

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Should vacuum process config file reload more often
Next
From: Michael Paquier
Date:
Subject: Re: pg_dump/pg_restore: Fix stdin/stdout handling of custom format on Win32