Improve readability of code PROCESS_MAIN in vacuum_rel()
authorMichael Paquier <michael@paquier.xyz>
Wed, 8 Mar 2023 00:16:44 +0000 (09:16 +0900)
committerMichael Paquier <michael@paquier.xyz>
Wed, 8 Mar 2023 00:16:44 +0000 (09:16 +0900)
commitee56048b0ecfee67a76ba8502b91cb5d91b6b03d
tree18cc2470bf2658235c2fbd34c63fd086196f6ef0
parent99be6feec9717058b9ac9d80f3584e0a9a6e8580
Improve readability of code PROCESS_MAIN in vacuum_rel()

4211fbd has been handling PROCESS_MAIN in vacuum_rel() with an "if/else
if" structure to avoid an extra level of indentation, but this has been
found as being rather parse to read.  This commit updates the code so as
we check for PROCESS_MAIN in a single place and then handle its
subpaths, FULL or non-FULL vacuums.  Some comments are added to make
that clearer for the reader.

Reported-by: Melanie Plageman
Author: Nathan Bossart
Reviewed-by: Michael Paquier, Melanie Plageman
Discussion: https://postgr.es/m/20230306194009.5cn6sp3wjotd36nu@liskov
src/backend/commands/vacuum.c