replace IDENTIFY_SYSTEM code in receivelog.c with RunIdentifySystem()

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: replace IDENTIFY_SYSTEM code in receivelog.c with RunIdentifySystem()
Date: 2021-08-30 05:30:40
Message-ID: CALj2ACVKKYUMC8GE72Y7BP9g1batrrq3sEwUh+1_i2krWZC_2Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I see a couple of improvements to receivelog.c and pg_receivewal.c:

1) ReceiveXlogStream in receivelog.c has a duplicate code to execute
IDENTIFY_SYSTEM replication command on the server which can be
replaced with RunIdentifySystem().
2) bool returning ReceiveXlogStream() in pg_receivewal.c is being used
without type-casting its return return value which might generate a
warning with some compilers. This kind of type-casting is more common
in other places in the postgres code base.

Attaching a patch to fix the above. Thoughts?

Regards,
Bharath Rupireddy.

Attachment Content-Type Size
v1-0001-replace-IDENTIFY_SYSTEM-code-in-receivelog.c-with.patch application/octet-stream 3.0 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Yugo NAGATA 2021-08-30 05:43:50 Re: Fix around conn_duration in pgbench
Previous Message Tatsuo Ishii 2021-08-30 05:22:49 Re: Fix around conn_duration in pgbench