Re: improve pg_receivewal code

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: Ronan Dunklau <ronan(dot)dunklau(at)aiven(dot)io>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: improve pg_receivewal code
Date: 2021-09-16 04:01:48
Message-ID: YULBrILiSI38GIUA@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Here's the v2 with above modifications.

I was looking at this patch, and I agree that checking for the system
ID and the timeline by setting sysidentifier beforehand looks like an
improvement.

The extra IDENTIFY_SYSTEM done at the beginning of StreamLog() is not
a performance bottleneck as we run it only once for each loop. I
don't really get the argument of a server replacing another one on the
same port requiring to rely only on the first system ID fetched before
starting the loops of StreamLog() calls. So I would leave main()
alone, but fill in the system ID from RunIdentifySystem() in
StreamLog().
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2021-09-16 04:13:40 Re: Signed vs Unsigned (take 2) (src/backend/storage/ipc/procarray.c)
Previous Message kuroda.hayato@fujitsu.com 2021-09-16 03:36:19 RE: Allow escape in application_name