postgres_fdw: Revert unstable tests for postgres_fdw.application_name.
authorFujii Masao <fujii@postgresql.org>
Wed, 8 Sep 2021 07:28:43 +0000 (16:28 +0900)
committerFujii Masao <fujii@postgresql.org>
Wed, 8 Sep 2021 07:28:43 +0000 (16:28 +0900)
Commit 449ab63505 added the tests that check that postgres_fdw.application_name
GUC works as expected. But they were unstable and caused some buildfarm
members to report the failure. This commit reverts those unstable tests.

Reported-by: Tom Lane as per buildfarm
Discussion: https://postgr.es/m/3220909.1631054766@sss.pgh.pa.us

contrib/postgres_fdw/expected/postgres_fdw.out
contrib/postgres_fdw/sql/postgres_fdw.sql

index 39befa394ad48f150a87e6d3ac5e79e2c94ca18d..e3ee30f1aaf37d19e250e1edca0fa6df45962fb3 100644 (file)
@@ -10761,82 +10761,3 @@ ERROR:  invalid value for integer option "fetch_size": 100$%$#$#
 CREATE FOREIGN TABLE inv_bsz (c1 int )
        SERVER loopback OPTIONS (batch_size '100$%$#$#');
 ERROR:  invalid value for integer option "batch_size": 100$%$#$#
--- ===================================================================
--- test postgres_fdw.application_name GUC
--- ===================================================================
--- Turn debug_discard_caches off for this test to make that
--- the remote connection is alive when checking its application_name.
--- For each test, close all the existing cached connections manually and
--- establish connection with new setting of application_name.
-SET debug_discard_caches = 0;
--- If appname is set as GUC but not as options of server object,
--- the GUC setting is used as application_name of remote connection.
-SET postgres_fdw.application_name TO 'fdw_guc_appname';
-SELECT 1 FROM postgres_fdw_disconnect_all();
- ?column? 
-----------
-        1
-(1 row)
-
-SELECT 1 FROM ft6 LIMIT 1;
- ?column? 
-----------
-        1
-(1 row)
-
-SELECT application_name FROM pg_stat_activity
-       WHERE application_name IN ('loopback2', 'fdw_guc_appname');
- application_name 
-------------------
- fdw_guc_appname
-(1 row)
-
--- If appname is set as options of server object but not as GUC,
--- appname of server object is used.
-RESET postgres_fdw.application_name;
-ALTER SERVER loopback2 OPTIONS (ADD application_name 'loopback2');
-SELECT 1 FROM postgres_fdw_disconnect_all();
- ?column? 
-----------
-        1
-(1 row)
-
-SELECT 1 FROM ft6 LIMIT 1;
- ?column? 
-----------
-        1
-(1 row)
-
-SELECT application_name FROM pg_stat_activity
-       WHERE application_name IN ('loopback2', 'fdw_guc_appname');
- application_name 
-------------------
- loopback2
-(1 row)
-
--- If appname is set both as GUC and as options of server object,
--- the GUC setting overrides appname of server object and is used.
-SET postgres_fdw.application_name TO 'fdw_guc_appname';
-SELECT 1 FROM postgres_fdw_disconnect_all();
- ?column? 
-----------
-        1
-(1 row)
-
-SELECT 1 FROM ft6 LIMIT 1;
- ?column? 
-----------
-        1
-(1 row)
-
-SELECT application_name FROM pg_stat_activity
-       WHERE application_name IN ('loopback2', 'fdw_guc_appname');
- application_name 
-------------------
- fdw_guc_appname
-(1 row)
-
---Clean up
-ALTER SERVER loopback2 OPTIONS (DROP application_name);
-RESET postgres_fdw.application_name;
-RESET debug_discard_caches;
index 20749868d31f79984bab59e1e718d424c9df900e..30b5175da5b21aa679a865226c8929fc9f836486 100644 (file)
@@ -3422,42 +3422,3 @@ CREATE FOREIGN TABLE inv_fsz (c1 int )
 -- Invalid batch_size option
 CREATE FOREIGN TABLE inv_bsz (c1 int )
        SERVER loopback OPTIONS (batch_size '100$%$#$#');
-
--- ===================================================================
--- test postgres_fdw.application_name GUC
--- ===================================================================
--- Turn debug_discard_caches off for this test to make that
--- the remote connection is alive when checking its application_name.
--- For each test, close all the existing cached connections manually and
--- establish connection with new setting of application_name.
-SET debug_discard_caches = 0;
-
--- If appname is set as GUC but not as options of server object,
--- the GUC setting is used as application_name of remote connection.
-SET postgres_fdw.application_name TO 'fdw_guc_appname';
-SELECT 1 FROM postgres_fdw_disconnect_all();
-SELECT 1 FROM ft6 LIMIT 1;
-SELECT application_name FROM pg_stat_activity
-       WHERE application_name IN ('loopback2', 'fdw_guc_appname');
-
--- If appname is set as options of server object but not as GUC,
--- appname of server object is used.
-RESET postgres_fdw.application_name;
-ALTER SERVER loopback2 OPTIONS (ADD application_name 'loopback2');
-SELECT 1 FROM postgres_fdw_disconnect_all();
-SELECT 1 FROM ft6 LIMIT 1;
-SELECT application_name FROM pg_stat_activity
-       WHERE application_name IN ('loopback2', 'fdw_guc_appname');
-
--- If appname is set both as GUC and as options of server object,
--- the GUC setting overrides appname of server object and is used.
-SET postgres_fdw.application_name TO 'fdw_guc_appname';
-SELECT 1 FROM postgres_fdw_disconnect_all();
-SELECT 1 FROM ft6 LIMIT 1;
-SELECT application_name FROM pg_stat_activity
-       WHERE application_name IN ('loopback2', 'fdw_guc_appname');
-
---Clean up
-ALTER SERVER loopback2 OPTIONS (DROP application_name);
-RESET postgres_fdw.application_name;
-RESET debug_discard_caches;