From: Michael Paquier <michael@paquier.xyz>
To: n.kalinin@postgrespro.ru
To: pgsql-bugs@lists.postgresql.org
Cc: Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com>
Subject: Re: BUG #18944: Assertion Failure in psql with idle_session_timeout Set
Date: Mon, 2 Jun 2025 17:13:48 +0900
Message-ID: <aD1dPMIZzAwMKm7G@paquier.xyz> (raw)
In-Reply-To: <18944-8a926c30f68387dd@postgresql.org>
References: <18944-8a926c30f68387dd@postgresql.org>
On Mon, Jun 02, 2025 at 06:34:12AM +0000, PG Bug reporting form wrote:
> Hello! When I execute the following query:
> psql <<EOF
> CREATE TABLE psql_pipeline(a INTEGER PRIMARY KEY, s TEXT);
> \startpipeline
> COPY psql_pipeline FROM STDIN;
> \syncpipeline
> \endpipeline
> EOF
> with `idle_session_timeout` set to, for example, 10000, I get the following
> error:
> FATAL: terminating connection due to idle-session timeout
> psql: common.c:1501: discardAbortedPipelineResults: Assertion
> `pset.available_results > 0' failed.
Reproduced here, thanks for the report. In this case, we are in a
PGRES_FATAL_ERROR state due to the timeout triggered by the backend,
and the loop discarding the results in discardAbortedPipelineResults()
does not take into account this case scenario: we don't have a result
to process yet, think that there is one, and kaboom. It seems to me
that we should just add an extra case for the result = NULL case as
there is nothing pending. A FATAL means that we need to give up
anyway.
Anthonin, what do you think?
--
Michael
Attachments:
[application/pgp-signature] signature.asc (832B, ../aD1dPMIZzAwMKm7G@paquier.xyz/2-signature.asc)
download
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: michael@paquier.xyz, n.kalinin@postgrespro.ru, pgsql-bugs@lists.postgresql.org, anthonin.bonnefoy@datadoghq.com
Subject: Re: BUG #18944: Assertion Failure in psql with idle_session_timeout Set
In-Reply-To: <aD1dPMIZzAwMKm7G@paquier.xyz>
* 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