From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Simplify tests of postgres_fdw terminating connections |
Date: | 2021-04-14 05:33:10 |
Message-ID: | E1lWY9G-0005P4-T6@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Simplify tests of postgres_fdw terminating connections
The tests introduced in 32a9c0b for connections broken and
re-established rely on pg_terminate_backend() for their logic. When
these were introduced, this function simply sent a signal to a backend
without waiting for the operation to complete, and the tests repeatedly
looked at pg_stat_activity to check if the operation was completed or
not. Since aaf0432, it is possible to define a timeout to make
pg_terminate_backend() wait for a certain duration, so make use of it,
with a timeout reasonably large enough (3min) to give enough room for
the tests to pass even on slow machines.
Some measurements show that the tests of postgres_fdw are much faster
with this change. For example, on my laptop, they now take 4s instead
of 6s.
Author: Bharath Rupireddy
Discussion: https://postgr.es/m/CALj2ACXGY_EfGrMTjKjHy2zi-u1u9rdeioU_fro0T6Jo8t56KQ@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/93f41461449f917da20af4fa2973f8afe8e6ea6e
Modified Files
--------------
contrib/postgres_fdw/expected/postgres_fdw.out | 34 ++++++++++++--------------
contrib/postgres_fdw/sql/postgres_fdw.sql | 26 +++++---------------
2 files changed, 22 insertions(+), 38 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2021-04-14 06:57:27 | pgsql: doc: Move force_parallel_mode to section for developer options |
Previous Message | Amit Kapila | 2021-04-14 03:26:41 | pgsql: Use NameData datatype for slotname in stats. |