pgsql: Handle operator-stack-overflow errors softly in tsquery and ltxt

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Handle operator-stack-overflow errors softly in tsquery and ltxt
Date: 2026-10-05 19:45:52
Message-ID: E1xDodE-00000000SCQ-1o0s@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(at)gmail(dot)com>
Author: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Nathan Bossart 2026-10-05 19:52:47 pgsql: Fix pg_blocking_pids() for relation extension locks.
Previous Message Tom Lane 2026-10-05 16:52:56 pgsql: Don't absorb child pathkeys into dummy AppendPaths for set-ops.