8 Commits

Author SHA1 Message Date
Sven Klemm
bfe3603d57 Move pg version specific part of create_hypertable test with custom partition type
Since custom types are hashable in PG14 the partition test will be
different on PG14. Since the only difference was testing whether
creating hypertable with custom type paritition throws errors
without partitioning function that specific test got moved to ddl
tests which already is pg version specific.
2021-10-11 21:07:02 +02:00
Sven Klemm
2e6fc74254 Fix index creation for hypertables with dropped columns
The index creation code would take the IndexInfo from the hypertable
and adjust it for the chunk but wouldnt reset IndexInfo for each
individual chunk leading to errors when the hypertable has dropped
columns.

Fixes #2504
2021-02-23 21:15:05 +01:00
Sven Klemm
b5a9d33ef3 Make ddl test output PG version specific
PG13 adds the relation to constraint violation error messages making
the test output different from previous PG versions.
2021-01-29 21:45:48 +01:00
Sven Klemm
3859b5a6d2 Change ddl test to not depend on PG version 2020-09-01 15:07:17 +02:00
Sven Klemm
d4240becda Remove ddl_single test
The ddl_single test was almost exactly the same as the ddl test except
for 5 statements not part of the ddl_single test. So the ddl_single test
can safely be removed.
2020-09-01 15:07:17 +02:00
Sven Klemm
663463771b Use EXECUTE FUNCTION instead of EXECUTE PROCEDURE
Replace EXECUTE PROCEDURE with EXECUTE FUNCTION because the former
is deprecated in PG11+. Unfortunately some test output will still
have EXECUTE PROCEDURE because pg_get_triggerdef in PG11 still
generates a definition with EXECUTE PROCEDURE.
2020-06-02 17:33:05 +02:00
Erik Nordström
ece582d458 Add mappings table for remote hypertables
In a multi-node (clustering) setup, TimescaleDB needs to track which
remote servers have data for a particular distributed hypertable. It
also needs to know which servers to place new chunks on and to use in
queries against a distributed hypertable.

A new metadata table, `hypertable_server` is added to map a local
hypertable ID to a hypertable ID on a remote server. We require that
the remote hypertable has the same schema and name as the local
hypertable.

When a local server is removed (using `DROP SERVER` or our
`delete_server()`), all remote hypertable mappings for that server
should also be removed.
2020-05-27 17:31:09 +02:00
Brian Rowe
54c9256256 Add version specific golden files to some tests
This change moves the custom_type, ddl, ddl_single, insert, and
partition tests under test/sql, as well as the move and reorder
tests under /tsl/test/sql to our test template framework.  This
allows them to have different golden files for different version of
Postgres.

With the exception of the reorder test, all of these tests produced
new output in PG12 which only differed by the exclusion of append
nodes from plan explanations (this exclusion  is a new feature of
PG12).  The reorder test had some of these modified plans, but also
included a test using a table with OIDs, which is not valid in PG12.
This test was modified to allow the table creation to fail, and we
captured the expected output in the new golden file for PG12.
2020-04-14 23:12:15 +02:00