Re: Lost logs with csvlog redirected to stderr under WIN32 service

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Chris Bandy <bandy(dot)chris(at)gmail(dot)com>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Andrew Dunstan <andrew(at)dunslane(dot)net>
Subject: Re: Lost logs with csvlog redirected to stderr under WIN32 service
Date: 2021-10-07 04:26:46
Message-ID: YV53Boypc7zUoxt2@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

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