1
0
mirror of https://github.com/timescale/timescaledb.git synced 2025-05-25 15:50:27 +08:00

Enable continuous_aggs tests on all PG version.

This commit is contained in:
Bharathy 2023-04-28 07:22:32 +05:30
parent 1d092560f4
commit 2ce4bbc432
12 changed files with 7996 additions and 11 deletions

@ -1552,11 +1552,13 @@ SELECT * from search_query_count_3 ORDER BY 1, 2, 3;
-- more data
-- ).
insert into raw_data select '2000-05-01 00:00+0','Q3', 0, 0;
-- On PG >= 14 the refresh test below will pass because we added support for UPDATE/DELETE on compressed chunks in PR #5339
\set ON_ERROR_STOP 0
CALL refresh_continuous_aggregate('search_query_count_3', NULL, '2000-06-01 00:00+0'::timestamptz);
ERROR: cannot update/delete rows from chunk "_hyper_41_79_chunk" as it is compressed
CALL refresh_continuous_aggregate('search_query_count_3', '2000-05-01 00:00+0'::timestamptz, '2000-06-01 00:00+0'::timestamptz);
NOTICE: continuous aggregate "search_query_count_3" is already up-to-date
ERROR: cannot update/delete rows from chunk "_hyper_41_79_chunk" as it is compressed
\set ON_ERROR_STOP 1
--insert row
insert into raw_data select '2001-05-10 00:00+0','Q3', 100, 100;
--this should succeed since it does not refresh any compressed regions in the cagg
@ -1583,7 +1585,7 @@ WHERE materialization_id = :'MAT_HTID' ORDER BY 1, 2,3;
materialization_id | lowest_modified_value | greatest_modified_value
--------------------+-----------------------+-------------------------
41 | -9223372036854775808 | -210866803200000001
41 | 959817600000000 | 988675199999999
41 | 946857660000000 | 988675199999999
41 | 991353600000000 | 9223372036854775807
(3 rows)

@ -1552,10 +1552,13 @@ SELECT * from search_query_count_3 ORDER BY 1, 2, 3;
-- more data
-- ).
insert into raw_data select '2000-05-01 00:00+0','Q3', 0, 0;
-- On PG >= 14 the refresh test below will pass because we added support for UPDATE/DELETE on compressed chunks in PR #5339
\set ON_ERROR_STOP 0
CALL refresh_continuous_aggregate('search_query_count_3', NULL, '2000-06-01 00:00+0'::timestamptz);
ERROR: cannot update/delete rows from chunk "_hyper_41_79_chunk" as it is compressed
CALL refresh_continuous_aggregate('search_query_count_3', '2000-05-01 00:00+0'::timestamptz, '2000-06-01 00:00+0'::timestamptz);
NOTICE: continuous aggregate "search_query_count_3" is already up-to-date
ERROR: cannot update/delete rows from chunk "_hyper_41_79_chunk" as it is compressed
\set ON_ERROR_STOP 1
--insert row
insert into raw_data select '2001-05-10 00:00+0','Q3', 100, 100;
--this should succeed since it does not refresh any compressed regions in the cagg
@ -1582,7 +1585,7 @@ WHERE materialization_id = :'MAT_HTID' ORDER BY 1, 2,3;
materialization_id | lowest_modified_value | greatest_modified_value
--------------------+-----------------------+-------------------------
41 | -9223372036854775808 | -210866803200000001
41 | 959817600000000 | 988675199999999
41 | 946857660000000 | 988675199999999
41 | 991353600000000 | 9223372036854775807
(3 rows)

@ -1552,10 +1552,12 @@ SELECT * from search_query_count_3 ORDER BY 1, 2, 3;
-- more data
-- ).
insert into raw_data select '2000-05-01 00:00+0','Q3', 0, 0;
-- On PG >= 14 the refresh test below will pass because we added support for UPDATE/DELETE on compressed chunks in PR #5339
\set ON_ERROR_STOP 0
CALL refresh_continuous_aggregate('search_query_count_3', NULL, '2000-06-01 00:00+0'::timestamptz);
CALL refresh_continuous_aggregate('search_query_count_3', '2000-05-01 00:00+0'::timestamptz, '2000-06-01 00:00+0'::timestamptz);
NOTICE: continuous aggregate "search_query_count_3" is already up-to-date
\set ON_ERROR_STOP 1
--insert row
insert into raw_data select '2001-05-10 00:00+0','Q3', 100, 100;
--this should succeed since it does not refresh any compressed regions in the cagg

@ -1552,10 +1552,12 @@ SELECT * from search_query_count_3 ORDER BY 1, 2, 3;
-- more data
-- ).
insert into raw_data select '2000-05-01 00:00+0','Q3', 0, 0;
-- On PG >= 14 the refresh test below will pass because we added support for UPDATE/DELETE on compressed chunks in PR #5339
\set ON_ERROR_STOP 0
CALL refresh_continuous_aggregate('search_query_count_3', NULL, '2000-06-01 00:00+0'::timestamptz);
CALL refresh_continuous_aggregate('search_query_count_3', '2000-05-01 00:00+0'::timestamptz, '2000-06-01 00:00+0'::timestamptz);
NOTICE: continuous aggregate "search_query_count_3" is already up-to-date
\set ON_ERROR_STOP 1
--insert row
insert into raw_data select '2001-05-10 00:00+0','Q3', 100, 100;
--this should succeed since it does not refresh any compressed regions in the cagg

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -7,6 +7,7 @@
/compression_insert-*.sql
/compression_permissions-*.sql
/continuous_aggs-*.sql
/continuous_aggs_deprecated-*.sql
/dist_grant-*.sql
/dist_query-*.sql
/dist_hypertable-*.sql

@ -111,8 +111,6 @@ endif(CMAKE_BUILD_TYPE MATCHES Debug)
if((${PG_VERSION_MAJOR} GREATER_EQUAL "14"))
if(CMAKE_BUILD_TYPE MATCHES Debug)
list(APPEND TEST_FILES chunk_utils_internal.sql)
list(APPEND TEST_TEMPLATES continuous_aggs.sql.in
continuous_aggs_deprecated.sql)
endif()
list(APPEND TEST_FILES compression.sql compression_update_delete.sql
compression_permissions.sql)
@ -172,6 +170,8 @@ if(CMAKE_BUILD_TYPE MATCHES Debug)
dist_partial_agg.sql.in
dist_query.sql.in
cagg_invalidation_dist_ht.sql.in
continuous_aggs.sql.in
continuous_aggs_deprecated.sql.in
cagg_joins.sql.in)
if(USE_TELEMETRY)
list(APPEND TEST_TEMPLATES telemetry_stats.sql.in)

@ -1124,8 +1124,11 @@ SELECT * from search_query_count_3 ORDER BY 1, 2, 3;
-- ).
insert into raw_data select '2000-05-01 00:00+0','Q3', 0, 0;
-- On PG >= 14 the refresh test below will pass because we added support for UPDATE/DELETE on compressed chunks in PR #5339
\set ON_ERROR_STOP 0
CALL refresh_continuous_aggregate('search_query_count_3', NULL, '2000-06-01 00:00+0'::timestamptz);
CALL refresh_continuous_aggregate('search_query_count_3', '2000-05-01 00:00+0'::timestamptz, '2000-06-01 00:00+0'::timestamptz);
\set ON_ERROR_STOP 1
--insert row
insert into raw_data select '2001-05-10 00:00+0','Q3', 100, 100;