Re: Fix typo with logical connector (src/backend/commands/vacuumparallel.c)

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fix typo with logical connector (src/backend/commands/vacuumparallel.c)
Date: 2022-08-19 12:13:46
Message-ID: CAA4eK1JX2txZ2qmtDn6OofdUiRe4HbUHbPBkdbXgwkhaBz9wLA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Aug 19, 2022 at 5:40 PM Bharath Rupireddy
<bharath(dot)rupireddyforpostgres(at)gmail(dot)com> wrote:
>
> On Fri, Aug 19, 2022 at 5:35 PM Ranier Vilela <ranier(dot)vf(at)gmail(dot)com> wrote:
> >
> > Hi,
> >
> > At function parallel_vacuum_process_all_indexes there is
> > a typo with a logical connector.
> >
> > I think that correct is &&, because both of the operators are
> > bool types [1].
> >
> > As a result, parallel vacuum workers can be incorrectly enabled.
> >
> > Attached a trivial fix.
> >
> > [1] https://wiki.sei.cmu.edu/confluence/display/c/EXP46-C.+Do+not+use+a+bitwise+operator+with+a+Boolean-like+operand
>
> Good catch! Patch LGTM.
>

+1. This looks fine to me as well. I'll take care of this early next
week unless someone thinks otherwise.

--
With Regards,
Amit Kapila.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Geier 2022-08-19 13:03:35 Re: Reducing planning time on tables with many indexes
Previous Message Bharath Rupireddy 2022-08-19 12:10:40 Fix a comment in WalSnd structure