7 Commits

Author SHA1 Message Date
Ruslan Fomkin
8f84e35e5d Run rowsecurity test on PG12
Runs a modification of rowsecurity test on PG12. The differences are:
- WITH OIDS is removed from PG12.
- OID column is replaced with CTID in queries, which is expected to be
stable enough.
- MATERIALIZED is used on WITH to get the same plan.
- Detail of an error message is slightly different in PG12.

Improved ORDER BY in number of queries in PG11 and PG12 tests to avoid
result permutations.
2020-04-14 23:12:15 +02:00
Sven Klemm
c5c13415f0 Use ChunkAppend to replace Append nodes
This patch makes TimescaleDB use ChunkAppend in places where it
used to used to use ConstraintAwareAppend before.
ConstraintAwareAppend will still be used for MergeAppend nodes
that cannot be changed to Ordered Append or when ChunkAppend is
disabled.
When a query on a hypertable is identified as benefitting from
execution exclusion Append nodes will be replaced by ChunkAppend
nodes.
This will enable the use of runtime exclusion for joins, lateral
joins, subqueries and correlated subqueries.
2019-06-20 14:20:46 +02:00
Matvey Arye
c1e8b341d0 Fix rowsecurity test output for PG11.3
PG11.3 changes the output of tuple headers slightly during output.
Change the rowsecurity test to elide the headers for affected test
rows to make the tests the same for before and after 11.3.
2019-05-30 15:04:48 -04:00
Sven Klemm
207391bc54 Remove parent oid from find_children_oids result
Since the parent table of a hypertable cannot contain
any rows including it in the plan is not necessary. PostgreSQL might
also not have good statistics for the main table as autoanalyze is
triggered by inserts which never happen to the main table, leading to
worse plans.

This patch adds a new guc enable_constraint_exclusion to disable
planner constraint exclusion. Constraint exclusion will not work with
cursors and WHERE CURRENT OF so the new guc will allow you to disable
that feature.

This patch also fixes constraint exclusion for JOINs and sort
optimization for queries with chunks_in.
2019-02-21 12:28:59 -05:00
Sven Klemm
f89fd07c5b Remove year from SQL file license text
This changes the license text for SQL files to be identical
with the license text for C files.
2019-01-13 23:30:22 +01:00
Sven Klemm
787cc0470e Replace hardcoded database name from regression tests
Replace hardcoded database name from regression tests with :TEST_DBNAME
Remove creation of database single_2 from test runner and add it to
bgw_launcher and loader test since no other tests used those
use SQL comments in test scripts
2018-12-28 19:26:27 +01:00
David Kohn
5aa1edac15 Refactor compatibility functions and code to support PG11
Introduce PG11 support by introducing compatibility functions for
any whose signatures have changed in PG11. Additionally, refactor
the structure of the compatibility functions found in compat.h by
breaking them out by function (or small set of similar functions)
so that it is easier to see what changed between versions and maintain
changes as more versions are supported.

In general, the philosophy has been to try for forward compatibility
wherever possible, so that we use the latest versions of function interfaces
where we can or where reasonably convenient and mimic the behavior
in older versions as much as possible.
2018-12-12 11:42:33 -05:00