pgsql: Fix poll_query_until() timeout handling with an undefined query

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix poll_query_until() timeout handling with an undefined query
Date: 2026-08-12 07:23:54
Message-ID: E1wu3JZ-00000000EC6-0bXR@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix poll_query_until() timeout handling with an undefined query in Cluster.pm

On timeout, poll_query_until() would fail to print its report when
"$query" was undefined. Instead of the expected report, this prevented
the contents of stdout and stderr from being shown.

Note that some of the in-core tests use an undefined query for
connection-only polls.

Author: Bryan Green <dbryan(dot)green(at)gmail(dot)com>
Reviewed-by: Jonathan Gonzalez V. <jonathan(dot)abdiel(at)gmail(dot)com>
Discussion: https://postgr.es/m/0f515c6d-6032-4c5f-80ac-5c78faae9522@gmail.com
Backpatch-through: 14

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/37c4a0730f8e9230b8e15a33ec5ebd4dae24ca96

Modified Files
--------------
src/test/perl/PostgreSQL/Test/Cluster.pm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Daniel Gustafsson 2026-08-12 07:43:45 pgsql: Use per-query timeout in subscription test
Previous Message Amit Kapila 2026-08-12 06:02:26 pgsql: Remove unnecessary list_free() calls in OpenTableList().