Re: Lost logs with csvlog redirected to stderr under WIN32 service - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Lost logs with csvlog redirected to stderr under WIN32 service
Date
Msg-id YV53Boypc7zUoxt2@paquier.xyz
Whole thread Raw
In response to Re: Lost logs with csvlog redirected to stderr under WIN32 service  (Chris Bandy <bandy.chris@gmail.com>)
Responses Re: Lost logs with csvlog redirected to stderr under WIN32 service
List pgsql-hackers
On Wed, Oct 06, 2021 at 09:33:24PM -0500, Chris Bandy wrote:
> I don't have a windows machine to test, but this refactor looks good to me.

Thanks for the review!  I did test this on Windows, only MSVC builds.

>> +    /* Write to CSV log, if enabled */
>> +    if ((Log_destination & LOG_DESTINATION_CSVLOG) != 0)
>
> This was originally "if (Log_destination & LOG_DESTINATION_CSVLOG)" and
> other conditions nearby still lack the "!= 0". Whatever the preferred
> style, the lines touched by this patch should probably do this consistently.

Yeah.  It looks like using a boolean expression here is easier for my
brain.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: [BUG] Logical replication failure "ERROR: could not map filenode "base/13237/442428" to relation OID" with catalog modifying txns
Next
From: Masahiko Sawada
Date:
Subject: Re: strange case of "if ((a & b))"