Re: pg_recvlogical: Prevent flushed data from being re-sent after restarting replication

Mircea Cadariu <cadariu.mircea@gmail.com>

From: Mircea Cadariu <cadariu.mircea@gmail.com>
To: Fujii Masao <masao.fujii@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-12-03T08:59:18Z
Lists: pgsql-hackers
Hi,

On 28/11/2025 02:15, Fujii Masao wrote:
> I've made a few minor adjustments to the test patch.
> The updated version is attached.

Thanks for the updated patch! Nice improvements.

Two futher proposals for the current version of the test.

Shall we use slurp_file then everywhere we need file reads? (instead of 
pg_read_file)

The following can be seen as nits for your consideration.

We can consider making the string provided in the "or die" to be 
consistent with the comment. We can pick one of the options below and 
specify the same for each.

* receive and write the first INSERT / receive first INSERT

* establish a new connection / to reconnect

* receive and write  / receive

If we are mentioning multiple INSERTs instead of just one, might read 
better if we add the "s" at the end. This might be just my preference 
though, I leave it up to you.

-- 
Thanks,
Mircea Cadariu