pgsql: Improve readability of code PROCESS_MAIN in vacuum_rel()

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Improve readability of code PROCESS_MAIN in vacuum_rel()
Date: 2023-03-08 00:18:30
Message-ID: E1pZhVl-002Q3l-NX@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ee56048b0ecfee67a76ba8502b91cb5d91b6b03d

Modified Files
--------------
src/backend/commands/vacuum.c | 34 +++++++++++++++++++++-------------
1 file changed, 21 insertions(+), 13 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2023-03-08 02:42:21 pgsql: Ignore IntoClause.viewQuery in query jumbling
Previous Message Tom Lane 2023-03-07 23:22:19 pgsql: Fix more bugs caused by adding columns to the end of a view.