Re: Incorrect fd handling in syslogger.c for Win64 under EXEC_BACKEND - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Incorrect fd handling in syslogger.c for Win64 under EXEC_BACKEND
Date
Msg-id YVKp9KdbZx8b/mD6@paquier.xyz
Whole thread Raw
In response to Incorrect fd handling in syslogger.c for Win64 under EXEC_BACKEND  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Incorrect fd handling in syslogger.c for Win64 under EXEC_BACKEND
List pgsql-hackers
On Tue, Sep 28, 2021 at 12:41:40PM +0900, Michael Paquier wrote:
> Am I missing something obvious?  One thing that we could do here is
> to do the parsing with pg_lltoa() while printing the argument with
> INT64_FORMAT, no?

I wrote that a bit too quickly.  After looking at it, what we could
use to parse the handle pointer is scanint8() instead, even if that's
a bit ugly.  I also found the code a bit confused regarding "fd", that
could be manipulated as an int or intptr_t, so something like the
attached should improve the situation.

Opinions welcome.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Failed transaction statistics to measure the logical replication progress
Next
From: Masahiko Sawada
Date:
Subject: Re: Failed transaction statistics to measure the logical replication progress