From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Handle operator-stack-overflow errors softly in tsquery and ltxt
Date: Mon, 05 Oct 2026 19:45:52 +0000
Message-ID: <E1xDodE-00000000SCQ-1o0s@gemulon.postgresql.org> (raw)
Handle operator-stack-overflow errors softly in tsquery and ltxtquery.
When we converted these types' input functions to report errors
through the soft-error mechanism, we missed that stack-overflow
errors can be triggered through bad user input. Convert those
to be reported softly, too.
Bug: #19745
Reported-by: Ke <kehan5800@gmail.com>
Author: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/19745-39cd7b93a505f9a9@postgresql.org
Backpatch-through: 16
Branch
------
REL_17_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/ffbe37115ad1016e78e59de14c7f86ed8aaefc3e
Modified Files
--------------
contrib/ltree/ltxtquery_io.c | 8 ++++----
src/backend/utils/adt/tsquery.c | 14 +++++++++-----
2 files changed, 13 insertions(+), 9 deletions(-)
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Handle operator-stack-overflow errors softly in tsquery and ltxt
In-Reply-To: <E1xDodE-00000000SCQ-1o0s@gemulon.postgresql.org>
References: <E1xDodE-00000000SCQ-1o0s@gemulon.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