timescaledb/scripts/test_functions.inc
Fabrízio de Royes Mello 78490c47b7 Remove support for creating CAggs with old format
Timescale 2.7 released a new version of Continuous Aggregate (#4269)
that store the final aggregation state instead of the byte array of
the partial aggregate state, offering multiple opportunities of
optimizations as well a more compact form.

In 2.10.0 released on February 2023 the Continuous Aggregate old format
deprecation was announced.

With this PR the ability of creating Continuous Aggregate in the old
format was removed, but we still support migrate from the old to the
new format by running the `cagg_migrate` procedure.

This is the continuation of the PR #5977 started by @pdipesh02.

References:
https://docs.timescale.com/api/latest/continuous-aggregates/cagg_migrate/
https://github.com/timescale/timescaledb/releases/tag/2.10.0
https://github.com/timescale/timescaledb/releases/tag/2.7.0
https://github.com/timescale/timescaledb/pull/5977
2023-12-13 18:48:31 -03:00

49 lines
952 B
Bash

#!/usr/bin/env bash
SCRIPT_DIR=$(dirname $0)
# Run tests given as arguments.
#
# Options:
# -r Run repair tests (optional)
# -k Keep temporary directory
# -vN Use version N of the update tests (required)
run_tests() (
export TEST_VERSION
export TEST_REPAIR=false
export DO_CLEANUP=true
OPTIND=1
while getopts "kv:r" opt;
do
case $opt in
v)
TEST_VERSION=v$OPTARG
;;
k)
DO_CLEANUP=false
;;
r)
TEST_REPAIR=true
;;
*)
exit 1
;;
esac
done
shift $((OPTIND-1))
export TAGS="$@"
if [[ "$TEST_REPAIR" = "true" ]]; then
bash ${SCRIPT_DIR}/test_repairs.sh
else
bash ${SCRIPT_DIR}/test_updates.sh
fi
EXIT_CODE=$?
if [ $EXIT_CODE -ne 0 ]; then
exit $EXIT_CODE
fi
)