postgresql/contrib/postgres_fdw
Michael Paquier 93f4146144 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
2021-04-14 14:23:53 +09:00
..
expected Simplify tests of postgres_fdw terminating connections 2021-04-14 14:23:53 +09:00
sql Simplify tests of postgres_fdw terminating connections 2021-04-14 14:23:53 +09:00
.gitignore Add postgres_fdw contrib module. 2013-02-21 05:27:16 -05:00
Makefile postgres_fdw: Add function to list cached connections to foreign servers. 2021-01-18 15:11:08 +09:00
connection.c Allow TRUNCATE command to truncate foreign tables. 2021-04-08 20:56:08 +09:00
deparse.c Allow TRUNCATE command to truncate foreign tables. 2021-04-08 20:56:08 +09:00
option.c Allow TRUNCATE command to truncate foreign tables. 2021-04-08 20:56:08 +09:00
postgres_fdw--1.0--1.1.sql postgres_fdw: Add functions to discard cached connections. 2021-01-26 15:35:54 +09:00
postgres_fdw--1.0.sql Add postgres_fdw contrib module. 2013-02-21 05:27:16 -05:00
postgres_fdw.c Allow TRUNCATE command to truncate foreign tables. 2021-04-08 20:56:08 +09:00
postgres_fdw.control postgres_fdw: Add function to list cached connections to foreign servers. 2021-01-18 15:11:08 +09:00
postgres_fdw.h Allow TRUNCATE command to truncate foreign tables. 2021-04-08 20:56:08 +09:00
shippable.c Replace remaining uses of "whitelist". 2021-01-05 14:00:16 +13:00