Re: pg_recvlogical: Prevent flushed data from being re-sent after restarting replication
Fujii Masao <masao.fujii@gmail.com>
From: Fujii Masao <masao.fujii@gmail.com>
To: Mircea Cadariu <cadariu.mircea@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-01-10T00:44:36Z
Lists: pgsql-hackers
On Sat, Jan 10, 2026 at 12:53 AM Mircea Cadariu
<cadariu.mircea@gmail.com> wrote:
> Thanks for the updated patch set!
>
> I applied them and it builds correctly and the test passes on my laptop.
Thanks for the test! Barring any objections, I will commit the patches.
> About termination on Windows, I've noticed the following in file 006_logical_decoding.pl:
>
> # some Windows Perls at least don't like IPC::Run's start/kill_kill regime.
> skip "Test fails on Windows perl", 2 if $Config{osname} eq 'MSWin32';
>
> It seems that previously, in a similar situation the decision was to skip it on Windows.
>
> If we adopt the same approach for this test it should be fine, the production code in the patch is not Windows-specific.
Yes, I also noticed that Windows-specific handling while investigating
the test failure. Since IMO it's worth verifying that pg_recvlogical behaves
as expected on Windows, I'd prefer the approach taken in the v4 patch.
> Alternatively if we keep the approach in v4, we can consider updating 006_logical_decoding.pl as well so they're consistent.
That's possible. But TBH I'm not sure how much effort is justified here.
The test uses pg_recvlogical to activate the slot and doesn't really test
pg_recvlogical itself. It's unclear how valuable it is to additionally run
this test on Windows...
Regards,
--
Fujii Masao
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
pg_recvlogical: remove unnecessary OutputFsync() return value checks.
- b98cc4a14e53 19 (unreleased) landed
-
Add test for pg_recvlogical reconnection behavior.
- d89b1d817513 19 (unreleased) landed
-
Add a new helper function wait_for_file() to Utils.pm.
- 0b10969db610 19 (unreleased) landed
-
pg_recvlogical: Prevent flushed data from being re-sent.
- 41cbdab0ab6d 19 (unreleased) landed