diff options
author | Robert Haas <rhaas@postgresql.org> | 2018-02-28 10:15:17 -0500 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2018-02-28 10:15:17 -0500 |
commit | 4fa396464e5fe238b7994535182f28318c61c78e (patch) | |
tree | c1c7d7a3219598cbe7ba72b0991440c5c73a8801 /contrib/postgres_fdw/sql/postgres_fdw.sql | |
parent | c161ea138fe123ad266ed22d153c9539f20c1325 (diff) | |
download | postgresql-4fa396464e5fe238b7994535182f28318c61c78e.tar.gz postgresql-4fa396464e5fe238b7994535182f28318c61c78e.zip |
postgres_fdw: Third attempt to stabilize regression tests.
Commit 1bc0100d270e5bcc980a0629b8726a32a497e788 added this test,
and commit 882ea509fe7a4711fe25463427a33262b873dfa1 tried to
stabilize it. There were still failures, so commit
958e20e42d6c346ab89f6c72e4262230161d1663 tried again to stabilize
it. That approach is still failing on jaguarundi, though, so
back it out and try something else. Specifically, instead of
disabling remote estimates for the table in question, let's tell
autovacuum to leave it alone.
Etsuro Fujita
Discussion: http://postgr.es/m/5A82DCCE.3060107@lab.ntt.co.jp
Diffstat (limited to 'contrib/postgres_fdw/sql/postgres_fdw.sql')
-rw-r--r-- | contrib/postgres_fdw/sql/postgres_fdw.sql | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/contrib/postgres_fdw/sql/postgres_fdw.sql b/contrib/postgres_fdw/sql/postgres_fdw.sql index 9e477292784..7f4d0dab258 100644 --- a/contrib/postgres_fdw/sql/postgres_fdw.sql +++ b/contrib/postgres_fdw/sql/postgres_fdw.sql @@ -39,6 +39,9 @@ CREATE TABLE "S 1"."T 1" ( c8 user_enum, CONSTRAINT t1_pkey PRIMARY KEY ("C 1") ); +-- "S 1"."T 1" will be heavily updated below, so disable autovacuum for +-- the table to avoid unexpected effects of that +ALTER TABLE "S 1"."T 1" SET (autovacuum_enabled = 'false'); CREATE TABLE "S 1"."T 2" ( c1 int NOT NULL, c2 text, @@ -1068,11 +1071,6 @@ explain (verbose, costs off) select * from ft3 f, loct3 l -- =================================================================== -- test writable foreign table stuff -- =================================================================== --- Autovacuum on the remote side might affect remote estimates, --- so use local stats on ft2 as well -ALTER FOREIGN TABLE ft2 OPTIONS (SET use_remote_estimate 'false'); -ANALYZE ft2; - EXPLAIN (verbose, costs off) INSERT INTO ft2 (c1,c2,c3) SELECT c1+1000,c2+100, c3 || c3 FROM ft2 LIMIT 20; INSERT INTO ft2 (c1,c2,c3) SELECT c1+1000,c2+100, c3 || c3 FROM ft2 LIMIT 20; @@ -1213,9 +1211,7 @@ commit; select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; select c2, count(*) from "S 1"."T 1" where c2 < 500 group by 1 order by 1; --- Go back to use remote-estimate mode on ft2 VACUUM ANALYZE "S 1"."T 1"; -ALTER FOREIGN TABLE ft2 OPTIONS (SET use_remote_estimate 'true'); -- Above DMLs add data with c6 as NULL in ft1, so test ORDER BY NULLS LAST and NULLs -- FIRST behavior here. |