pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Improve readability of code PROCESS_MAIN in vacuum_rel()
Date: Wed, 08 Mar 2023 00:18:30 +0000
Message-ID: <E1pZhVl-002Q3l-NX@gemulon.postgresql.org> (raw)

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(-)



Message-ID: <E1pZhVl-002Q3l-NX@gemulon.postgresql.org>
Permalink:  ../E1pZhVl-002Q3l-NX@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1pZhVl-002Q3l-NX@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz
  Subject: Re: pgsql: Improve readability of code PROCESS_MAIN in vacuum_rel()
  In-Reply-To: <E1pZhVl-002Q3l-NX@gemulon.postgresql.org>
  References: <E1pZhVl-002Q3l-NX@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox