15 Commits

Author SHA1 Message Date
Alexander Kuzmenkov
5c0110cbbf Mark partialize_agg as parallel safe
Postgres knows whether a given aggregate is parallel-safe, and creates
parallel aggregation plans based on that. The `partialize_agg` is a
wrapper we use to perform partial aggregation on data nodes. It is a
pure function that produces serialized aggregation state as a result.
Being pure, it doesn't influence parallel safety. This means we don't
need to mark it parallel-unsafe to artificially disable the parallel
plans for partial aggregation. They will be chosen as usual based on
the parallel-safety of the underlying aggregate function.
2022-05-31 14:53:58 +05:30
Sven Klemm
8c5c7bb4ad Filter out chunk ids in shared tests
Multinode queries use _timescaledb_internal.chunks_in to specify
the chunks from which to select data. The chunk id in
regresscheck-shared is not stable and may differ depending on
execution order leading to flaky tests.
2022-05-19 21:33:33 +02:00
Sven Klemm
11c6813b1d Fix flaky regresscheck-shared
While we do filter out chunk ids and hypertable ids from the test
output, the output was still unstable when those ids switch between
single and double digit as that changes the length of the query
decorator in EXPLAIN output. This patch removes this decorator
entirely from all shared test output.
2022-05-18 17:34:11 +02:00
Alexander Kuzmenkov
3b35da7607 More tests for errors when fetching from data nodes
Add a special function that allows to inject these errors.
2022-05-16 18:57:42 +05:30
Fabrízio de Royes Mello
b0695e788a Fix flaky distributed grant tests
Commit 9b180915 introduce some tests that are a bit flaky because are
checking a DEBUG message from Postgres catcache rehashing.

Fixed it by teaching our test runner to ignore this Postgres DEBUG
message.
2022-04-21 14:41:17 -03:00
Alexander Kuzmenkov
4a17d4c402 Add shellcheck to CI
Writing a shell script correctly can be hard even for a skilled
programmer. shellcheck is a static analysis tool that helps catch
common errors in shell scripts. We now have 36 executable scripts in
our repository, for which shellcheck reports 126 errors (calculated
like find . -type f -executable -exec bash -c '[ "$(file --brief
--mime-type "$1")" == "text/x-shellscript" ]' sh {} \; -exec shellcheck
-f gcc --exclude=SC2086 {} \; | cut -d: -f1 | sort | uniq | wc -l).
This commit fixes these warnings and adds a GitHub actions workflow
that runs shellcheck on all the executable shell scripts in the
repository. The warning SC2086: Double quote to prevent globbing and
word splitting is disabled globally, because it has little practical
consequences, sometimes leads to false positives, and is general is too
widespread because people forget to quote.
2021-11-15 14:54:14 +03:00
Sven Klemm
1b08f11297 Filter out chunk and hypertable ids from test output
Currently any tests in regresscheck-shared can only include
EXPLAIN output if they only access the precreated hypertables
as hypertables and chunks created in the test itself will
have ids depending on execution order of the shared tests.
This patch filters out those ids so shared tests can include
EXPLAIN output for local hypertables.
2021-06-17 14:03:28 +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
9fbc19e6c9 Filter out incremental sort memory usage
EXPLAIN ANALYZE output of incremental sort nodes contains details
about memory usage which is not stable and might lead to flaky tests.
This patch filters out memory usage from test output.
2021-02-12 22:18:06 +01:00
Sven Klemm
6ad98a45bb Move license change test to regresscheck-shared 2020-08-29 23:15:20 +02:00
Sven Klemm
02d715f216 Add distributed hypertable to regresscheck-shared
This patch sets up a distributed hypertable in the regresscheck-shared
environment to enable running distributed tests.
2020-08-12 21:46:31 +02:00
Sven Klemm
ae0f17705b Improve behaviour of test runner when being run in parallel
The test runner used to use a lockfile to decide whether
initial cluster setup has to be done. Unfortunately
checking for existance and creating the lockfile are 2 distinct
operations leading to race conditions. This patch changes the
runner to use a directory instead because with a directory
the operation is atomic.
2020-06-22 18:14:29 +02:00
Matvey Arye
85d35af140 Fix shared tests on OSX
Fix the test runner to work with the OSX version of tests.
2019-11-07 20:29:19 -05:00
Sven Klemm
6fe5ef3957 Move prepared statement queries to shared tests
This patch moves the prepared statement test to the shared tests so
they can be run on compressed hypertables as well.
2019-11-07 15:56:20 +01:00
Sven Klemm
819414df02 Add test infrastructure with shared tables
This PR adds test infrastructure for running tests with shared tables.
This allows having hypertables with specific configurations usable for
all tests. Since these tests also don't require creating a new database
for each test case some of the overhead of the normal tests is removed.
While this will lead to much faster query tests some tests will still
require their own database to test things, but most queres could be moved
to this infrastructure to improve test coverage and speed them up.
2019-10-29 19:02:58 -04:00