Skip to content

Commit 5e64ad3

Browse files
committed
postgres_fdw: Revert unstable tests for postgres_fdw.application_name.
Commit 6e0cb3d added the tests that check that escape sequences in postgres_fdw.application_name setting are replaced with status information expectedly. But they were unstable and caused some buildfarm members to report the failure. This commit reverts those unstable tests.
1 parent 6e0cb3d commit 5e64ad3

File tree

2 files changed

+0
-53
lines changed

2 files changed

+0
-53
lines changed

contrib/postgres_fdw/expected/postgres_fdw.out

-32
Original file line numberDiff line numberDiff line change
@@ -10825,35 +10825,3 @@ ERROR: invalid value for integer option "batch_size": 100$%$#$#
1082510825
ALTER FOREIGN DATA WRAPPER postgres_fdw OPTIONS (nonexistent 'fdw');
1082610826
ERROR: invalid option "nonexistent"
1082710827
HINT: There are no valid options in this context.
10828-
-- ===================================================================
10829-
-- test postgres_fdw.application_name GUC
10830-
-- ===================================================================
10831-
-- Close all the existing cached connections so that new connection
10832-
-- will be established with new setting of postgres_fdw.application_name.
10833-
SELECT 1 FROM postgres_fdw_disconnect_all();
10834-
?column?
10835-
----------
10836-
1
10837-
(1 row)
10838-
10839-
-- Add some escape sequences into postgres_fdw.application_name
10840-
-- so as to test that they are replaced with status information expectedly.
10841-
SET postgres_fdw.application_name TO '%a%u%d%p%%';
10842-
BEGIN;
10843-
SELECT 1 FROM ft6 LIMIT 1;
10844-
?column?
10845-
----------
10846-
1
10847-
(1 row)
10848-
10849-
SELECT count(*) FROM pg_stat_activity
10850-
WHERE application_name = current_setting('application_name') ||
10851-
CURRENT_USER || current_database() || pg_backend_pid() || '%';
10852-
count
10853-
-------
10854-
1
10855-
(1 row)
10856-
10857-
COMMIT;
10858-
--Clean up
10859-
RESET postgres_fdw.application_name;

contrib/postgres_fdw/sql/postgres_fdw.sql

-21
Original file line numberDiff line numberDiff line change
@@ -3452,24 +3452,3 @@ CREATE FOREIGN TABLE inv_bsz (c1 int )
34523452

34533453
-- No option is allowed to be specified at foreign data wrapper level
34543454
ALTER FOREIGN DATA WRAPPER postgres_fdw OPTIONS (nonexistent 'fdw');
3455-
3456-
-- ===================================================================
3457-
-- test postgres_fdw.application_name GUC
3458-
-- ===================================================================
3459-
-- Close all the existing cached connections so that new connection
3460-
-- will be established with new setting of postgres_fdw.application_name.
3461-
SELECT 1 FROM postgres_fdw_disconnect_all();
3462-
3463-
-- Add some escape sequences into postgres_fdw.application_name
3464-
-- so as to test that they are replaced with status information expectedly.
3465-
SET postgres_fdw.application_name TO '%a%u%d%p%%';
3466-
3467-
BEGIN;
3468-
SELECT 1 FROM ft6 LIMIT 1;
3469-
SELECT count(*) FROM pg_stat_activity
3470-
WHERE application_name = current_setting('application_name') ||
3471-
CURRENT_USER || current_database() || pg_backend_pid() || '%';
3472-
COMMIT;
3473-
3474-
--Clean up
3475-
RESET postgres_fdw.application_name;

0 commit comments

Comments
 (0)