mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-28 09:46:44 +08:00
Make truncating a uncompressed chunk drop the data for the case where they reside in a corresponding compressed chunk. Generate invalidations for Continuous Aggregates after TRUNCATE, so as to have consistent refresh operations on the materialization hypertable. Fixes #4362
30 lines
901 B
MySQL
30 lines
901 B
MySQL
-- This file and its contents are licensed under the Timescale License.
|
|
-- Please see the included NOTICE for copyright information and
|
|
-- LICENSE-TIMESCALE for a copy of the license.
|
|
|
|
------------------------------------
|
|
-- Set up a distributed environment
|
|
------------------------------------
|
|
\c :TEST_DBNAME :ROLE_CLUSTER_SUPERUSER
|
|
|
|
\set DATA_NODE_1 :TEST_DBNAME _1
|
|
\set DATA_NODE_2 :TEST_DBNAME _2
|
|
\set DATA_NODE_3 :TEST_DBNAME _3
|
|
|
|
\ir include/remote_exec.sql
|
|
|
|
SELECT (add_data_node (name, host => 'localhost', DATABASE => name)).*
|
|
FROM (VALUES (:'DATA_NODE_1'), (:'DATA_NODE_2'), (:'DATA_NODE_3')) v (name);
|
|
|
|
GRANT USAGE ON FOREIGN SERVER :DATA_NODE_1, :DATA_NODE_2, :DATA_NODE_3 TO PUBLIC;
|
|
|
|
\set IS_DISTRIBUTED TRUE
|
|
|
|
\ir include/cagg_invalidation_common.sql
|
|
|
|
-- cleanup
|
|
\c :TEST_DBNAME :ROLE_CLUSTER_SUPERUSER;
|
|
DROP DATABASE :DATA_NODE_1;
|
|
DROP DATABASE :DATA_NODE_2;
|
|
DROP DATABASE :DATA_NODE_3;
|