50 Commits

Author SHA1 Message Date
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
Ruslan Fomkin
cdb4c8fa4f Ignore flaky test for now
continuous_aggs_policy is flaky and prevents to proceed with current
PRs. This commit ignores it until it is fixed.
2020-10-01 12:40:19 +02:00
Ruslan Fomkin
01fc0de040 Fix failing isolation test on PG11.0
Early version of PG11 produces slightly different output for isolation
tests. Thus the affected tests are ignored.
continuous_aggs_concurrent_refresh is one of them and this commit adds
it to the ignored test list.
2020-09-15 15:30:07 +02:00
Sven Klemm
1c92a29ba3 Fix macos ci builds
Since GitHub updated the macos image used for CI it updated llvm
to a version that is buggy on macos. So this patch disables building
postgres with llvm support on macos. It also fixes the cache suffix
code for macos because it changed with the latest runner version,
and uses the image version now as cache suffix.

https://bugs.llvm.org/show_bug.cgi?id=47226
2020-08-24 17:02:16 +02:00
Sven Klemm
91f64b8177 Run regression tests on PG 11.9 and 12.4
This patch changes all regression tests that were running on 11.8
and 12.3 to 11.9 and 12.4.
2020-08-15 00:38:21 +02:00
Sven Klemm
417908f19b Fix macos build
A recent change changed the macos build to run in release mode
which also changed postgres to be built without assertions.
Since we inherit the assertion setting from postgres this leads
to assertions being disabled for our code as well.
With assertions disabled clang errors on detecting null pointer
dereferences so this patch turns assertions for macos back on.
Since the postgres build is cached this took not effect immediately
and remained unnoticed in the CI run against the PR introducing the
change.
2020-08-01 17:24:24 +02:00
Ruslan Fomkin
f62fd957b7 Test both debug and release on MacOS in CI
Switches MacOS test in PR to run release, so the build time is
reduced. Adds the test in Debug to scheduled job.
2020-07-31 23:08:53 +02:00
Sven Klemm
5bb4bfdf50 Ignore results of flaky tests 2020-07-08 19:16:37 +02:00
Sven Klemm
c96216e631 Improve github action stacktrace handling
Check for coredumps and only execute the stracktrace if there are
actually coredumps. This patch also changes the log handling to
always collect logs and upload them cause they might have useful
information even when all steps succeed. Additionally a list
of all failed tests is shown before the regression diff.
This patch also disables fail-fast so a single failed job does
not cancel other jobs still in progress.
2020-06-29 17:50:53 +02:00
Sven Klemm
0d2cc046c2 Ignore continuous_aggs_insert and continuous_aggs_multi on PG11.0
The log output in the isolation tests when running on PG 11.0 seems
to be suppressed and not be recorded leading to a diff in the test
output.
2020-06-24 21:20:17 +02:00
Sven Klemm
b810dd3780 Add MacOS regression tests 2020-06-19 00:05:37 +02:00
Sven Klemm
0bff7dcac3 Run linux regression tests as GitHub action
Since we want to run additional test configurations when triggered
by a push to prerelease_test or by cron but github actions don't
allow a dynamic matrix via yaml configuration we generate the matrix
with a python script. While we could always have the full matrix
and have if checks on every step that would make the actual checks
harder to browse because the workflow will have lots of entries and
only by navigating into the individual jobs would t sit be visible
if a job was actually run.
Additionally we set fail-fast to true for pull requests and false
for other event types.
2020-06-15 00:56:33 +02:00