pgsql: Hopefully make libpq_pipeline's new cancel test more reliable

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Hopefully make libpq_pipeline's new cancel test more reliable
Date: 2024-03-13 18:56:09
Message-ID: E1rkTlo-003dUT-M4@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Hopefully make libpq_pipeline's new cancel test more reliable

The newly introduced cancel test in libpq_pipeline was flaky. It's not
completely clear why, but one option is that the check for "active" was
actually seeing the active state for the previous query. This change
should address any such race condition by first waiting until the
connection is reported as idle.

Author: Jelte Fennema-Nio <me(at)jeltef(dot)nl>
Discussion: https://postgr.es/m/CAGECzQRvmUK5-d68A+cm+fgmfht9Dv2uZ28-qq3QiaF6EAZqPQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1ee910ce437188eab40eddf32dc7d81952e99f82

Modified Files
--------------
src/test/modules/libpq_pipeline/libpq_pipeline.c | 78 +++++++++++++++---------
1 file changed, 49 insertions(+), 29 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2024-03-13 19:13:25 pgsql: Add the system identifier to backup manifests.
Previous Message Robert Haas 2024-03-13 16:18:02 pgsql: Expose new function get_controlfile_by_exact_path().