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

Started by Michael Paquier3 months ago1 messagescommitters
Jump to latest
#1Michael Paquier
michael@paquier.xyz

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.green@gmail.com>
Reviewed-by: Jonathan Gonzalez V. <jonathan.abdiel@gmail.com>
Discussion: /messages/by-id/0f515c6d-6032-4c5f-80ac-5c78faae9522@gmail.com
Backpatch-through: 14

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/cfa6884677ce05dce7fd1103c2fa1f71ce02d4b1

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