| From: | Michael Paquier <michael(at)paquier(dot)xyz> |
|---|---|
| To: | Alexander Lakhin <exclusion(at)gmail(dot)com> |
| Cc: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
| Subject: | Re: BUG #19494: Error on transaction commit inside pipeline triggers psql's Assert |
| Date: | 2026-05-29 05:00:20 |
| Message-ID: | ahkdZJMZvyYlsfXK@paquier.xyz |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
On Fri, May 29, 2026 at 07:00:01AM +0300, Alexander Lakhin wrote:
> it's happening upon/after postgres process termination, so PQgetResult()
> returns NULL, pset.piped_syncs == 1. I need more time to look deeper and
> to come with a reproducer, but maybe you can already see what's wrong.
Yeah, I do. Nice catch. See this sequence to reproduce the problem:
\startpipeline
INSERT INTO psql_pipeline_defer VALUES (1), (1) \bind \sendpipeline
\syncpipeline
SELECT pg_terminate_backend(pg_backend_pid()) \bind \sendpipeline
SELECT 1 \bind \sendpipeline
\endpipeline
When ending the pipeline the loop consuming the results is stuck, so
we could check the connection state. We are going to enter in a
freeze of the branches due to beta1 next week, so let's take our time.
Please feel to use the v2 attached for your tests. I am also testing
it more on my side.
--
Michael
| Attachment | Content-Type | Size |
|---|---|---|
| v2-0001-psql-Fix-issues-with-deferred-errors-in-pipelines.patch | text/plain | 10.5 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Álvaro Herrera | 2026-05-29 14:23:35 | Re: BUG #19500: pgrepack logical decoding plugin can crash assert builds via SQL decoding API |
| Previous Message | Alexander Lakhin | 2026-05-29 04:00:01 | Re: BUG #19494: Error on transaction commit inside pipeline triggers psql's Assert |