RE: 030_pg_recvlogical fails because the same PID is assigned

From: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
To: 'Fujii Masao' <masao(dot)fujii(at)gmail(dot)com>
Cc: Alexander Lakhin <exclusion(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: RE: 030_pg_recvlogical fails because the same PID is assigned
Date: 2026-08-06 05:24:22
Message-ID: OS9PR01MB12149CD8B0A04C61F9414C660F5D22@OS9PR01MB12149.jpnprd01.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dear Fujii-san,

Sorry for the late reply, I missed your post.

> +$node->wait_for_log(
> + qr/START_REPLICATION SLOT \"reconnect_test\" LOGICAL/,
> + $log_offset);
>
> Could this pattern also match the STATEMENT log entry emitted when
> the old walsender is terminated by pg_terminate_backend()?

Good catch, it can be.

> If so,
> is it be better to wait for the new slot acquisition instead? For example:
>
> qr/acquired logical replication slot \"reconnect_test\"/,

Another way is to check the start position specified by the START_REPLICATION is
advanced, but your approach seems better. PSA new version.

Best regards,
Hayato Kuroda
FUJITSU LIMITED

Attachment Content-Type Size
v2-0001-Make-030_pg_recvlogical-robust.patch application/octet-stream 1.7 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2026-08-06 05:49:12 Re: Whole row var issue
Previous Message shveta malik 2026-08-06 04:55:25 Re: Support EXCEPT for TABLES IN SCHEMA publications