61 Commits

Author SHA1 Message Date
Sven Klemm
94ca9c66f4 Ignore telemetry isolation test on PG13.2
Commit 7b9d8673 added an isolation test for telemetry but did not
add it to the ignore list for earlier postgres versions. PG14 changed
the output format for isolation tests which got backported to PG12
and PG13 which makes the output of earlier PG12 and PG13 different
from the latest one so we ignore isolation tests on those earlier
versions.
2022-05-20 21:37:01 +02:00
Sven Klemm
aa0b36d5ba Skip telemetry test on PG12.0
With recent refactorings the telemetry test seems to trigger the
same use-after-free bug that got triggered by tablespace test so
we skip that test on PG12.0 as well.
2022-05-20 20:31:19 +02:00
Sven Klemm
b845f9423b Skip tablespace test on PG12.0
The tablespace test causes a segfault on PG12.0 due to an upstream
bug in the event trigger handling.
2022-05-20 17:18:21 +02:00
Sven Klemm
a7c8641e04 Bump postgres versions used in CI
Bump postgres versions used in CI to 14.3, 13.7 and 12.11.
2022-05-17 15:24:38 +02:00
Fabrízio de Royes Mello
557023c3a7 Revert "Ignore flaky "dist_gapfill_pushdown" test"
This reverts commit cf83b3b9c2d899fa0156d5c94dc4848b7584e3c9.
2022-05-16 15:21:32 -03:00
Sven Klemm
bb241ffcd1 Add missing ignores for dist_gapfill_pushdown
The patch to ignore result of dist_gapfill_pushdown missed some
places that overwrite installcheck_args.
2022-05-09 10:24:46 +02:00
Konstantina Skovola
cf83b3b9c2 Ignore flaky "dist_gapfill_pushdown" test
This is a *temporary* change to our workflows to ignore the test
because it is flaky and requires many jobs to be restarted before a
commit can be merged.  Does not address the issue that causes the
flakiness, which needs to be investigated.
2022-05-03 10:33:19 +03:00
Alexander Kuzmenkov
0ab2d39f25 Set correct collation for segmentby columns of compressed chunks
We don't do this currently, so some queries return the wrong ordering
of rows if there is an index on the compressed chunk. The fix only
works for the newly created chunks. We could add a migration that
corrects the old compressed chunks, but it seems to be too heavy and
not to lend itself well to automation -- we'll have to recreate the
indexes if there are any. So the old chunks continue to return a wrong
result.
2022-04-18 21:46:50 +05:30
Markos Fountoulakis
e9fb9acbbb Fix regressions found in nightly CI
Add concurrent_query_and_drop_chunks to ignore-list and fix C compiler
warning.
2022-03-03 19:29:58 +02:00
Mats Kindahl
15d33f0624 Add option to compile without telemetry
Add option `USE_TELEMETRY` that can be used to exclude telemetry from
the compile.

Telemetry-specific SQL is moved, which is only included when extension
is compiled with telemetry and the notice is changed so that the
message about telemetry is not printed when Telemetry is not compiled
in.

The following code is not compiled in when telemetry is not used:
- Cross-module functions for telemetry.
- Checks for telemetry job in job execution.
- GUC variables `telemetry_level` and `telemetry_cloud`.

Telemetry subsystem is not included when compiling without telemetry,
which requires some functions to be moved out of the telemetry
subsystem:
- Metadata handling is moved out of the telemetry module since it is
  used not only with telemetry.
- UUID functions are moved into a separate module instead of being
  part of the telemetry subsystem.
- Telemetry functions are either added or removed when updating from a
  previous version.

Tests are updated to:
- Not use telemetry functions to get UUID or Metadata and instead use
  the moved UUID and metadata functions.
- Not include telemetry information in tests that do not require it.
- Configuration files do not set telemetry variables when telemetry is
  not compiled in.
- Replaced usage of telemetry functions in non-telemetry tests with
  other sources of same information.

Fixes #3931
2022-03-03 12:21:07 +01:00
Sven Klemm
65ffa44711 Bump postgres versions used in CI to 14.2, 13.6, 12.10 2022-02-12 03:39:56 +01:00
Sven Klemm
5c22ef3da2 Rename continuous aggregate tests
Change the prefix for continuous aggregate tests from
continuous_aggs_ to cagg_. This is similar to commit 6a8c2b66
which did this adjustment for isolation tests because we were
running into length limitations for the spec name. This patch
adjusts the remaining tests to be consistent with the naming
used in isolation tests.
2022-01-24 14:12:56 +01:00
Sven Klemm
c5796c0f1d Ignore memoize test in pg14 snapshot
Upstream changed the explain output for the memoize node to include
an additional `Cache Mode` line. While we could adjust our test
runner to always ignore that line this would prevent us from testing
the cache mode in future tests.

6c32c09777
2022-01-17 14:44:58 +01:00
Sven Klemm
1f9bd81ee0 Adjust CI ignore lists to isolation test renames
Commit 6a8c2b66 renamed cagg tests in isolationcheck-t to have a
common prefix but did not adjust the CI ignorelists to reflect
that change.
2022-01-16 14:46:58 +01:00
Sven Klemm
69b267071a Bump copyright year in license descriptions
Bump year in copyright information to 2022 and adjust same scripts
to reference NOTICE that didn't have the reference yet.
This patch also removes orphaned test/expected/utils.out.
2022-01-14 18:35:46 +01:00
Mats Kindahl
210886e508 Ignore deadlock_recompress_chunk in early version
This isolation test will fail in early versions of the PG servers, just
like the other isolation tests, so ignoring failures for it.
2021-12-02 11:33:16 +01:00
Sven Klemm
e4ec15d881 Bump postgres versions used in CI to 12.9, 13.5, 14.1 2021-11-14 20:43:39 +01:00
Sven Klemm
0fecefdafa Skip chunk_utils for PG12
Skip the chunk_utils test on PG12 instead of ignoring it because
since the test segfaults it might actually cancel other tests
even though it doesn't run in parallel.
2021-10-26 20:48:41 +02:00
Markos Fountoulakis
6d9715a951 Fix compiler warnings
Fix compiler warnings for MacOS 10.15 build.
2021-10-26 14:02:54 +03:00
Markos Fountoulakis
221437e8ef Continuous aggregates for distributed hypertables
Add support for continuous aggregates for distributed hypertables by
allowing a continuous aggregate to read from a distributed hypertable
so that the continuous aggregate is on the access node while the
hypertable data is on the data nodes.

For distributed hypertables, both the hypertable and continuous
aggregate invalidation log are kept on the data nodes and the refresh
window is computed at refresh time on each data node. Since the
continuous aggregate materialization hypertable is not present on the
data nodes, the invalidation log was extended to allow using a
non-local hypertable id on the data nodes. This means that you cannot
create continuous aggregates on the data nodes since those could clash
with continuous aggregates on the access node.

Some utility statements added entries to the invalidation logs
directly (truncating chunks and hypertables, as well as dropping
individual chunks), so to handle this case, internal functions were
added to allow logging invalidation on the data nodes from the access
node.

The commit also includes some fixes to memory context usage that
caused crashes for invalidation triggers and also disable per data
node queries during refresh since that would otherwise generate an
exception.

Fixes #3435

Co-authored-by: Mats Kindahl <mats@timescale.com>
2021-10-25 18:20:11 +03:00
Sven Klemm
4ff1bd3636 Ignore chunk_utils test results on PG 12.0
Postgres 12.0 has a use-after-free bug in the event trigger code
leading to a failing chunk_utils test in our nightly CI runs.
This patch ignores this test for runs on PG 12.0.

https://github.com/postgres/postgres/commit/93f726c0
2021-10-22 21:59:04 +02:00
Sven Klemm
01bf6518d4 Ignore pg_dump test result in macos PR tests
Since pg_dump fails very often on macos we ignore the result of
this test for PRs on macos.
2021-10-18 21:31:44 +02:00
Sven Klemm
e321d5212c Add more PG14 tests to CI
This patch adds PG14 coverity, release, apache and snapshot tests to CI.
2021-10-18 20:20:41 +02:00
Erik Nordström
57744c84ce Adjust cost estimates for distributed queries
To improve remote query push down, do the following:

* Import changes to remote cost estimates from PostgreSQL 14
  `postgres_fdw`. The cost estimations for distributed (remote)
  queries are originally based on the `postgres_fdw` code in
  PG11. However, fixes and changes have been applied in never
  PostgreSQL versions, which improves, among other things, costing of
  sorts and having clauses.
* Increase the cost of transferring tuples. This penalizes doing
  grouping/aggregation on the AN since it requires transferring more
  tuples, leading to the planner preferring the push-down plans.
* As a result of the above, the improved costing also makes
  distributed queries behave similar across all currently supported
  PostgreSQL versions for our test cases.
* Enable `dist_query` tests on PG14 (since it now passes).
* Update the `dist_partial_agg` test to use additional ordering
  columns so that there is no diff in the test output due to ordering
  of input to the `first` and `last` functions.
2021-10-15 15:34:08 +02:00
Sven Klemm
2f7bb43fe0 No longer require -DEXPERIMENTAL for PG14
Change cmake to no longer require -DEXPERIMENTAL when building
against PG14. Run more PG14 tests (32bit, windows, sanitizer).
2021-10-14 02:14:37 +02:00
Sven Klemm
bfe2b08350 Make dist_partial_agg output pg version specific
The plan output of the dist_partial_agg test is different on PG14
so we need to make it PG version specific. On PG14 sorts are pushed
down more often leading to better plans in some cases.
This also updates the dist_hypertable-14 test output which differs
to previous PG versions due to some renumbering of relation aliases.
2021-10-13 13:33:44 +02:00
Fabrízio de Royes Mello
de2d446cb2 Add handling of new ALTER TABLE options in PG14
PG14 introduced new `ALTER TABLE` sub-commands:

* `.. ALTER COLUMN .. SET COMPRESSION`: handled it properly on
  `process_utility` hook code and added related regression tests

* `.. DETACH PARTITION .. {CONCURRENTLY | FINALIZE}`: handled it
  properly on `process_utility` hook code but there's no need to add
  regression tests because we don't rely to native partitioning in
  hypertables.

Closes #3643
2021-10-12 19:01:20 -03:00
Sven Klemm
8d12b28a00 Fix UPSERT for PG14
Adjust code to upstream UPDATE/DELETE changes. PG14 refactored the way
UPDATEs and DELETEs are planned and executed.

https://github.com/postgres/postgres/commit/86dc90056d
2021-10-12 14:11:13 +02:00
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
d959828155 Don't use VACUUM VERBOSE in vacuum tests
VACUUM VERBOSE is the source for flaky tests and we don't gain much
by including the verbose output in the test. Additionally removing
the verbose option prevents us from having to make the vacuum tests
pg-version specific as PG14 slightly changes the formatting of the
VACUUM VERBOSE output.
2021-10-09 00:36:10 +02:00
Sven Klemm
4d425d9470 Disable memoize node for append and transparent_decompression tests
With memoize enabled PG14 append tests produce a very different
plan compared to previous PG versions. To make comparing plans
between PG versions easier we disable memoize for PG14.
PG14 also modified how EXTRACT is shown in EXPLAIN output
so any query using EXTRACT will have different EXPLAIN output
between PG14 and previous versions.
2021-10-09 00:15:23 +02:00
Sven Klemm
90d1a390c7 Require successful PG14 tests for PRs
The previous PR enabling tests on PG14 did not actually require
tests to pass but with INSERT support merged and most of the tests
passing it makes sense to require tests to pass to not introduce
regression and explicitly not require the currently known failing
tests.
2021-10-08 22:35:46 +02:00
Sven Klemm
6b69c781ba Add PG14 to our CI 2021-10-05 20:20:57 +02:00
Sven Klemm
2ee30f9d81 Run CI against PG snapshots
Run CI against PG snapshots to discover potential issues with
upcoming PG releases earlier.
2021-08-30 19:30:31 +02:00
Sven Klemm
c5ecbbc25b Bump postgres versions used in CI to latest
Since the isolationtester got modified to improve the query result
output which got backported in to PG12 and PG13 we have to adjust
all isolationtester output.

https://github.com/postgres/postgres/commit/4a05406
2021-08-17 18:06:03 +02:00
Sven Klemm
e9066d5531 Remove PG11 from CI
Remove all CI runs against postgres 11
2021-06-01 20:21:06 +02:00
Sven Klemm
72ed3a81c5 Explicitly install clang-9 in CI ubuntu images
GitHub removed default installation of clang-9 from the ubuntu
images but those are required to build postgres with llvm so we have
to explicitly install the required packages.

https://github.com/actions/virtual-environments/pull/3381
2021-05-20 21:26:47 +02:00
Sven Klemm
45384357bd Bump postgres versions used in CI
Change CI tests to run against pg 11.12, 12.7 and 13.3.

The latest postgres versions adjusts the event_trigger test to
output the list of currently defined event triggers making the
test output different when timescaledb is installed since we
define our own event triggers. Due to this change we have to
ignore the result of this test in our CI.

https://github.com/postgres/postgres/commit/f3c45378
2021-05-18 16:22:23 +02:00
Sven Klemm
349b298a05 Install clang-8 for PG11.0 CI test
clang-8 is no longer installed by default in the ubuntu images so
we have to explicitly install it for any actions that require it.

https://github.com/actions/virtual-environments/issues/2950
2021-04-05 17:33:09 +02:00
Sven Klemm
c5c24616f8 Switch CI to Ubuntu 20.04
Switch CI tasks currently running on Ubuntu 18.04 to 20.04 and
also switch some tasks that dont require specific version because
they run in docker containers to use ubuntu-latest instead.
All tasks switched to ubuntu-latest are expected to be ubuntu-version
agnostic because they run their actions in docker containers.
2021-03-22 12:42:58 +01:00
Sven Klemm
d6cd54b5a7 Bump postgres versions used in CI
Run tests on PG 11.11, 12.6 and 13.2
2021-02-12 22:54:32 +01:00
Sven Klemm
9c7b024705 Run regresscheck-t on PG13
This patch enables running regresscheck-t on PG13
2021-02-12 22:18:06 +01:00
Mats Kindahl
63a66524dd Change bootstrap and CMake defaults
In contrast to the default for CMake files, `Release` is used as the
default in `CMakeFiles.txt` which causes the `bootstrap` script to do a
release build with development flags, in particular `-Werror`. Since
warnings are triggered in a release build, this cause the build to
fail while a debug build works fine.

This commit fixes this by removing the `-Werror` flag (by setting
`WARNINGS_AS_ERRORS` to `OFF`) on anything that is not a debug build
and also disable the warnings that (currently) trigger the warnings in
the release build.

The commit also changes some of the GitHub workflows to run without
`WARNINGS_AS_ERRORS` since it should always work without this option
regardless of build type (on release build this should be disabled, on
debug builds this should be enabled).  But it is set to `ON` for the
full release and debug builds to ensure that we do not generate any
warnings, which will capture new surfacing warnings.

Fixes #2770
2021-02-09 15:00:13 +01:00
Sven Klemm
fa42b973f1 Fix typo in CI config
When adding the bugfix for clustered hypertables a typo was
introduced making the PG12.0 test run with PG11 settings.
2021-02-08 10:06:23 +01:00
Sven Klemm
d823987fe9 Fix changing column type of clustered hypertables
When changing the column type of a column that is part of an index
that is being clustered on with either postgres CLUSTER or reorder
the alter type operation would fail with a segfault because it
couldn't lookup the index.
2021-02-06 14:51:04 +01:00
Sven Klemm
3afdf7cc72 Add pg13 to CI build matrix
Since the actual tests have not been adjusted for PG13 yet this
only checks compiling against PG13. A subsequent PR will enable
tests for PG13.
2021-01-15 13:07:52 +01:00
Michael J. Freedman
2c4584c71a Update copyright year to 2021 2021-01-13 17:01:32 -05:00
Mats Kindahl
c6d64e3e8d Fix compile issues in prerelease tests
There are some flags that cannot be used in preprelease tests, which
this commit fixes. It uses the flag `-DWARNINGS_AS_ERRORS=OFF` to not
turn warnings into errors for release builds. In addition, explicit
checks for compiler flags are added instead of using a function, which
for some reason causes problems.

Note that the prerelease tests run on a regular schedule as well.
2020-12-16 11:53:51 +01:00
Ruslan Fomkin
47da8790bc Test latest PG 11.10 and 12.5 2020-11-18 15:26:57 +01:00
gayyappan
b341506cb2 Enable continuous_aggs_policy test
Disable NOTICE messages for time based tables in
continuous_aggs_policy test. The refresh sometimes
does not have anything to update as the intervals
are computed based off now(). This causes intermittent
failures due to NOTICEs that the cagg is up to date.

Remove continuous_aggs_policy from ignores list in CI
scripts.
2020-10-01 16:47:10 -04:00