Re: FATAL: could not send end-of-streaming message to primary: no COPY in progress

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Stepan Neretin <slpmcf(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: FATAL: could not send end-of-streaming message to primary: no COPY in progress
Date: 2026-11-17 06:55:14
Message-ID: CAHGQGwEoLUeJ7QHcgfy9zQ3R+XD=acQd5ThRun098kwiBk02sA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Nov 17, 2026 at 2:58 AM Stepan Neretin <slpmcf(at)gmail(dot)com> wrote:
> The attached patch just remembers that CommandComplete already ended the
> COPY, and skips PQputCopyEnd() in that case. No walsender change.
>
> Does this still seem worth fixing?

Yes, I think.

Thanks for the patch! I haven't read it yet, but when I ran CI with it,
I observed that subscription/029_on_error failed with the following error:

436/436 postgresql:subscription / subscription/029_on_error
ERROR 257.82s exit status 29
――――――――――――――――――――――――――――――――――――― ✀ ―――――――――――――――――――――――――――――――――――――
stderr:
# poll_query_until timed out executing this query:
# SELECT count(1) = 0 FROM pg_subscription_rel WHERE srsubstate NOT IN
('r', 's');
# expecting this output:
# t
# last actual query output:
# f
# with stderr:
# Last pg_subscription_rel contents:
# 16392|16384|f|
# die: timed out waiting for subscriber to synchronize data at
/__w/postgresql/postgresql/src/test/subscription/t/029_on_error.pl
line 130.

(test program exited with status code 29)
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

Regards,

--
Fujii Masao

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zhijie Hou 2026-11-17 06:58:58 Re: Document prepared transaction lock waits with two_phase subscriptions
Previous Message Masahiko Sawada 2026-11-17 06:49:07 Re: Document prepared transaction lock waits with two_phase subscriptions