diff options
author | Robert Haas <rhaas@postgresql.org> | 2018-02-09 15:24:35 -0500 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2018-02-09 15:24:35 -0500 |
commit | 958e20e42d6c346ab89f6c72e4262230161d1663 (patch) | |
tree | dfa71f7e79bb388038089ec713fbbc07507071d3 /contrib/postgres_fdw/sql/postgres_fdw.sql | |
parent | b78d0160da13109c69acfd0caded3f920bff2f3b (diff) | |
download | postgresql-958e20e42d6c346ab89f6c72e4262230161d1663.tar.gz postgresql-958e20e42d6c346ab89f6c72e4262230161d1663.zip |
postgres_fdw: Attmempt to stabilize regression tests.
Even after commit 882ea509fe7a4711fe25463427a33262b873dfa1, some
buildfarm members are still failing in the postgres_fdw tests.
Try to fix that by disabling use of remote statistics for some
test cases.
Etsuro Fujita
Discussion: http://postgr.es/m/5A7D76CF.8080601@lab.ntt.co.jp
Diffstat (limited to 'contrib/postgres_fdw/sql/postgres_fdw.sql')
-rw-r--r-- | contrib/postgres_fdw/sql/postgres_fdw.sql | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/contrib/postgres_fdw/sql/postgres_fdw.sql b/contrib/postgres_fdw/sql/postgres_fdw.sql index 0b2c5289e3f..68fdfdc7659 100644 --- a/contrib/postgres_fdw/sql/postgres_fdw.sql +++ b/contrib/postgres_fdw/sql/postgres_fdw.sql @@ -1068,6 +1068,11 @@ 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; @@ -1208,6 +1213,10 @@ 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. -- ORDER BY DESC NULLS LAST options |