From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: ua.san.alex@gmail.com
Subject: BUG #18754: Logical replication cannot restart if client sent a copyDone
Date: Fri, 27 Dec 2024 12:54:30 +0000
Message-ID: <18754-e49e7bda4eb683d9@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 18754
Logged by: S.A.N
Email address: ua.san.alex@gmail.com
PostgreSQL version: 17.2
Operating system: MacOS
Description:
Logical replication cannot restart if the client sent a copyDone, because
the streamingDoneReceiving variable is not reassigned to false in function
StartLogicalReplication, this only happens when physical replication in
function StartReplication
https://github.com/postgres/postgres/blob/master/src/backend/replication/walsender.c#L906
I am writing a logical replication client, sometimes I need to exit copy
mode to send simple SQL queries.
I send copyDone, everything works correctly, I can perform SQL queries, but
then I need to return to replication mode, the START_REPLICATION command
will always completed immediately, because the streamingDoneReceiving
backend variable remains in true, I think it should be redefined in false
when starting logical replication.
Thanks.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, ua.san.alex@gmail.com
Subject: Re: BUG #18754: Logical replication cannot restart if client sent a copyDone
In-Reply-To: <18754-e49e7bda4eb683d9@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox