From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Melanie Plageman <melanieplageman(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, vignesh C <vignesh21(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: add PROCESS_MAIN to VACUUM
Date: 2023-03-06 21:13:37
Message-ID: 20230306211337.GA3076909@nathanxps13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Mon, Mar 06, 2023 at 03:48:28PM -0500, Melanie Plageman wrote:
> On Mon, Mar 6, 2023 at 3:27 PM Nathan Bossart <nathandbossart(at)gmail(dot)com> wrote:
>> 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?
> I think that would be clearer.

Here's a patch. Thanks for reviewing.

Nathan Bossart
Amazon Web Services:

Attachment Content-Type Size
process_main_readability_fix.patch text/x-diff 1.5 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2023-03-06 21:20:32 Re: proposal: possibility to read dumped table's name from file
Previous Message Gregory Stark (as CFM) 2023-03-06 20:55:01 Re: On login trigger: take three