Closed KAction closed 5 years ago
Hey @KAction this looks really awesome. Is there any way that we can also add TravisCI support in this PR? If not then I will merge it and try to do it based on Your work.
@galuszkak I believe you have more experience setting up Travis, since I have none :) But if travis allows running docker-in-docker (Gitlab does), all pieces are in place: just ./docheck py2-9.6; ./docheck py2-11
, etc.
@jhschuster thanks for reporting that, I think we should extend our testing platform for 9.5 and 9.4 as they are still supported by PostgreSQL project.
Changes
Add script to run installcheck tests in Docker. Running installcheck on living machine is quite problematic, since it requires installing shared library into system directory and running tests as specific system user "postgres".
Fix buggy cache-invalidation test
Previously, function "getColumnsFromTable" saved column name, extracted from TupleDesc without copying. When column is renamed, this value happens to keep pointing to old name with postgres-9.6, resulting cache not being invalidated.
This incorrect value was codified by cache_invalidation.out. In postgresql-11 and postgresql-12, that memory is cleared by postgres internals, resulting in cache invalidation. Correct result, incorrect rationale.
This commit fixes bug by storing fresh copy of column name in CacheEntry.columns. It avoids relying on postgresql internals.
Fix "explain" command reporting wrong plan width
Previously, many test suites were failing due psql reporting wrong plan width estimate. Documentation on how should foreign data wrapper provide width estimate is outdated.
This commit fixes these tests by updating another structure, provided to callback functions. It is undocumented and deduced purely by reading source of postgresql-9.6.15, but seems to work in postgresql-10,11 and 12.
This is link to (unanswered, at time of writing) question about this situation on pgsql-general.
https://www.postgresql.org/message-id/flat/20191004143550.GA30189%40debian