Simplify backend terminate and wait logic in postgres_fdw test

Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>

From: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-04-08T11:25:22Z
Lists: pgsql-hackers

Attachments

Hi,

With the recent commit aaf0432572 which introduced a waiting/timeout
capability for pg_teriminate_backend function, I would like to do
$subject. Attaching a patch, please have a look.

With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com

Commits

  1. Disable cache clobber to avoid breaking postgres_fdw termination test.

  2. Simplify tests of postgres_fdw terminating connections

  3. Add functions to wait for backend termination

  4. postgres_fdw: Fix tests for CLOBBER_CACHE_ALWAYS.