Re: add PROCESS_MAIN to VACUUM
Nathan Bossart <nathandbossart@gmail.com>
From: Nathan Bossart <nathandbossart@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: vignesh C <vignesh21@gmail.com>, pgsql-hackers@postgresql.org
Date: 2023-03-02T06:53:59Z
Lists: pgsql-hackers
Attachments
- v6-0001-add-PROCESS_MAIN-to-VACUUM.patch (text/x-diff)
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
Commits
-
Improve readability of code PROCESS_MAIN in vacuum_rel()
- ee56048b0ecf 16.0 landed
-
Add PROCESS_MAIN to VACUUM
- 4211fbd8413b 16.0 landed
-
Improve the regression tests of VACUUM (PROCESS_TOAST)
- 46d490ac19a7 16.0 landed
-
Display the leader apply worker's PID for parallel apply workers.
- d540a02a724b 16.0 cited