pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
To: vignesh C <vignesh21@gmail.com>
To: pgsql-hackers@postgresql.org
Subject: Re: add PROCESS_MAIN to VACUUM
Date: Mon, 6 Mar 2023 12:27:34 -0800
Message-ID: <20230306202734.GA3033389@nathanxps13> (raw)
In-Reply-To: <20230306194009.5cn6sp3wjotd36nu@liskov>
References: <20230107050724.GA914213@nathanxps13>
	<CALDaNm1bKSNG9Jc1mrtk2ZWsVdvTQw+XOnbB3yL_Xf57oAdg5Q@mail.gmail.com>
	<20230119190807.GA4062411@nathanxps13>
	<Y/7xVESfLgw3E/F/@paquier.xyz>
	<20230301172637.GA1456203@nathanxps13>
	<ZAA5vt7jUTRpPDmL@paquier.xyz>
	<20230302065359.GA2140777@nathanxps13>
	<ZAWbkiZSdFZOTS7F@paquier.xyz>
	<20230306173723.GA2934573@nathanxps13>
	<20230306194009.5cn6sp3wjotd36nu@liskov>

On Mon, Mar 06, 2023 at 02:40:09PM -0500, Melanie Plageman wrote:
> I noticed in vacuum_rel() in vacuum.c where table_relation_vacuum() is
> called, 4211fbd84 changes the else into an else if [1]. I understand
> after reading the commit and re-reading the code why that is now, but I
> was initially confused. I was thinking it might be nice to have a
> comment mentioning why there is no else case here (i.e. that the main
> table relation will be vacuumed on the else if branch).

This was a hack to avoid another level of indentation for that whole block
of code, but based on your comment, it might be better to just surround
this entire section with an "if (params->options & VACOPT_PROCESS_MAIN)"
check.  WDYT?

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





view thread (38+ messages)  latest in thread

Message-ID: <20230306202734.GA3033389@nathanxps13>
Permalink:  ../20230306202734.GA3033389@nathanxps13/
Also on:    postgresql.org/message-id/20230306202734.GA3033389@nathanxps13

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: nathandbossart@gmail.com, michael@paquier.xyz, vignesh21@gmail.com
  Subject: Re: add PROCESS_MAIN to VACUUM
  In-Reply-To: <20230306202734.GA3033389@nathanxps13>

* 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