Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove multinode cagg regression tests #6409

Merged
merged 1 commit into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
33 changes: 5 additions & 28 deletions tsl/test/expected/cagg_bgw-13.out
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
-- 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 IS_DISTRIBUTED FALSE
\ir include/cagg_bgw_common.sql
-- 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.
--
-- Setup
--
Expand Down Expand Up @@ -78,26 +73,17 @@ SELECT * FROM _timescaledb_catalog.continuous_agg;

-- though user on access node has required GRANTS, this will propagate GRANTS to the connected data nodes
GRANT CREATE ON SCHEMA public TO :ROLE_DEFAULT_PERM_USER;
psql:include/cagg_bgw_common.sql:76: WARNING: no privileges were granted for "public"
WARNING: no privileges were granted for "public"
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
CREATE TABLE test_continuous_agg_table(time int, data int);
\if :IS_DISTRIBUTED
SELECT create_distributed_hypertable('test_continuous_agg_table', 'time', chunk_time_interval => 10, replication_factor => 2);
\else
SELECT create_hypertable('test_continuous_agg_table', 'time', chunk_time_interval => 10);
psql:include/cagg_bgw_common.sql:82: NOTICE: adding not-null constraint to column "time"
NOTICE: adding not-null constraint to column "time"
create_hypertable
----------------------------------------
(1,public,test_continuous_agg_table,t)
(1 row)

\endif
CREATE OR REPLACE FUNCTION integer_now_test() returns int LANGUAGE SQL STABLE as $$ SELECT coalesce(max(time), 0) FROM test_continuous_agg_table $$;
\if :IS_DISTRIBUTED
CALL distributed_exec($DIST$
CREATE OR REPLACE FUNCTION integer_now_test() returns int LANGUAGE SQL STABLE as $$ SELECT coalesce(max(time), 0) FROM test_continuous_agg_table $$;
$DIST$);
\endif
SELECT set_integer_now_func('test_continuous_agg_table', 'integer_now_test');
set_integer_now_func
----------------------
Expand Down Expand Up @@ -372,7 +358,7 @@ SELECT ts_bgw_params_reset_time();
(1 row)

DROP MATERIALIZED VIEW test_continuous_agg_view;
psql:include/cagg_bgw_common.sql:234: NOTICE: drop cascades to table _timescaledb_internal._hyper_2_3_chunk
NOTICE: drop cascades to table _timescaledb_internal._hyper_2_3_chunk
CREATE MATERIALIZED VIEW test_continuous_agg_view
WITH (timescaledb.continuous,
timescaledb.materialized_only=true)
Expand Down Expand Up @@ -505,7 +491,7 @@ last_run_duration |

\x off
DROP MATERIALIZED VIEW test_continuous_agg_view;
psql:include/cagg_bgw_common.sql:294: NOTICE: drop cascades to table _timescaledb_internal._hyper_3_4_chunk
NOTICE: drop cascades to table _timescaledb_internal._hyper_3_4_chunk
--create a view with a function that it has no permission to execute
CREATE MATERIALIZED VIEW test_continuous_agg_view
WITH (timescaledb.continuous,
Expand Down Expand Up @@ -567,23 +553,14 @@ SELECT ts_bgw_params_reset_time();
-- Test creating continuous aggregate with a user that is the non-owner of the raw table
--
CREATE TABLE test_continuous_agg_table_w_grant(time int, data int);
\if :IS_DISTRIBUTED
SELECT create_distributed_hypertable('test_continuous_agg_table_w_grant', 'time', chunk_time_interval => 10, replication_factor => 2);
\else
SELECT create_hypertable('test_continuous_agg_table_w_grant', 'time', chunk_time_interval => 10);
psql:include/cagg_bgw_common.sql:332: NOTICE: adding not-null constraint to column "time"
NOTICE: adding not-null constraint to column "time"
create_hypertable
------------------------------------------------
(5,public,test_continuous_agg_table_w_grant,t)
(1 row)

\endif
CREATE OR REPLACE FUNCTION integer_now_test1() returns int LANGUAGE SQL STABLE as $$ SELECT coalesce(max(time), 0) FROM test_continuous_agg_table_w_grant $$;
\if :IS_DISTRIBUTED
CALL distributed_exec($DIST$
CREATE OR REPLACE FUNCTION integer_now_test1() returns int LANGUAGE SQL STABLE as $$ SELECT coalesce(max(time), 0) FROM test_continuous_agg_table_w_grant $$;
$DIST$);
\endif
SELECT set_integer_now_func('test_continuous_agg_table_w_grant', 'integer_now_test1');
set_integer_now_func
----------------------
Expand Down
33 changes: 5 additions & 28 deletions tsl/test/expected/cagg_bgw-14.out
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
-- 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 IS_DISTRIBUTED FALSE
\ir include/cagg_bgw_common.sql
-- 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.
--
-- Setup
--
Expand Down Expand Up @@ -78,26 +73,17 @@ SELECT * FROM _timescaledb_catalog.continuous_agg;

-- though user on access node has required GRANTS, this will propagate GRANTS to the connected data nodes
GRANT CREATE ON SCHEMA public TO :ROLE_DEFAULT_PERM_USER;
psql:include/cagg_bgw_common.sql:76: WARNING: no privileges were granted for "public"
WARNING: no privileges were granted for "public"
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
CREATE TABLE test_continuous_agg_table(time int, data int);
\if :IS_DISTRIBUTED
SELECT create_distributed_hypertable('test_continuous_agg_table', 'time', chunk_time_interval => 10, replication_factor => 2);
\else
SELECT create_hypertable('test_continuous_agg_table', 'time', chunk_time_interval => 10);
psql:include/cagg_bgw_common.sql:82: NOTICE: adding not-null constraint to column "time"
NOTICE: adding not-null constraint to column "time"
create_hypertable
----------------------------------------
(1,public,test_continuous_agg_table,t)
(1 row)

\endif
CREATE OR REPLACE FUNCTION integer_now_test() returns int LANGUAGE SQL STABLE as $$ SELECT coalesce(max(time), 0) FROM test_continuous_agg_table $$;
\if :IS_DISTRIBUTED
CALL distributed_exec($DIST$
CREATE OR REPLACE FUNCTION integer_now_test() returns int LANGUAGE SQL STABLE as $$ SELECT coalesce(max(time), 0) FROM test_continuous_agg_table $$;
$DIST$);
\endif
SELECT set_integer_now_func('test_continuous_agg_table', 'integer_now_test');
set_integer_now_func
----------------------
Expand Down Expand Up @@ -372,7 +358,7 @@ SELECT ts_bgw_params_reset_time();
(1 row)

DROP MATERIALIZED VIEW test_continuous_agg_view;
psql:include/cagg_bgw_common.sql:234: NOTICE: drop cascades to table _timescaledb_internal._hyper_2_3_chunk
NOTICE: drop cascades to table _timescaledb_internal._hyper_2_3_chunk
CREATE MATERIALIZED VIEW test_continuous_agg_view
WITH (timescaledb.continuous,
timescaledb.materialized_only=true)
Expand Down Expand Up @@ -505,7 +491,7 @@ last_run_duration |

\x off
DROP MATERIALIZED VIEW test_continuous_agg_view;
psql:include/cagg_bgw_common.sql:294: NOTICE: drop cascades to table _timescaledb_internal._hyper_3_4_chunk
NOTICE: drop cascades to table _timescaledb_internal._hyper_3_4_chunk
--create a view with a function that it has no permission to execute
CREATE MATERIALIZED VIEW test_continuous_agg_view
WITH (timescaledb.continuous,
Expand Down Expand Up @@ -567,23 +553,14 @@ SELECT ts_bgw_params_reset_time();
-- Test creating continuous aggregate with a user that is the non-owner of the raw table
--
CREATE TABLE test_continuous_agg_table_w_grant(time int, data int);
\if :IS_DISTRIBUTED
SELECT create_distributed_hypertable('test_continuous_agg_table_w_grant', 'time', chunk_time_interval => 10, replication_factor => 2);
\else
SELECT create_hypertable('test_continuous_agg_table_w_grant', 'time', chunk_time_interval => 10);
psql:include/cagg_bgw_common.sql:332: NOTICE: adding not-null constraint to column "time"
NOTICE: adding not-null constraint to column "time"
create_hypertable
------------------------------------------------
(5,public,test_continuous_agg_table_w_grant,t)
(1 row)

\endif
CREATE OR REPLACE FUNCTION integer_now_test1() returns int LANGUAGE SQL STABLE as $$ SELECT coalesce(max(time), 0) FROM test_continuous_agg_table_w_grant $$;
\if :IS_DISTRIBUTED
CALL distributed_exec($DIST$
CREATE OR REPLACE FUNCTION integer_now_test1() returns int LANGUAGE SQL STABLE as $$ SELECT coalesce(max(time), 0) FROM test_continuous_agg_table_w_grant $$;
$DIST$);
\endif
SELECT set_integer_now_func('test_continuous_agg_table_w_grant', 'integer_now_test1');
set_integer_now_func
----------------------
Expand Down
33 changes: 5 additions & 28 deletions tsl/test/expected/cagg_bgw-15.out
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
-- 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 IS_DISTRIBUTED FALSE
\ir include/cagg_bgw_common.sql
-- 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.
--
-- Setup
--
Expand Down Expand Up @@ -78,26 +73,17 @@ SELECT * FROM _timescaledb_catalog.continuous_agg;

-- though user on access node has required GRANTS, this will propagate GRANTS to the connected data nodes
GRANT CREATE ON SCHEMA public TO :ROLE_DEFAULT_PERM_USER;
psql:include/cagg_bgw_common.sql:76: WARNING: no privileges were granted for "public"
WARNING: no privileges were granted for "public"
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
CREATE TABLE test_continuous_agg_table(time int, data int);
\if :IS_DISTRIBUTED
SELECT create_distributed_hypertable('test_continuous_agg_table', 'time', chunk_time_interval => 10, replication_factor => 2);
\else
SELECT create_hypertable('test_continuous_agg_table', 'time', chunk_time_interval => 10);
psql:include/cagg_bgw_common.sql:82: NOTICE: adding not-null constraint to column "time"
NOTICE: adding not-null constraint to column "time"
create_hypertable
----------------------------------------
(1,public,test_continuous_agg_table,t)
(1 row)

\endif
CREATE OR REPLACE FUNCTION integer_now_test() returns int LANGUAGE SQL STABLE as $$ SELECT coalesce(max(time), 0) FROM test_continuous_agg_table $$;
\if :IS_DISTRIBUTED
CALL distributed_exec($DIST$
CREATE OR REPLACE FUNCTION integer_now_test() returns int LANGUAGE SQL STABLE as $$ SELECT coalesce(max(time), 0) FROM test_continuous_agg_table $$;
$DIST$);
\endif
SELECT set_integer_now_func('test_continuous_agg_table', 'integer_now_test');
set_integer_now_func
----------------------
Expand Down Expand Up @@ -372,7 +358,7 @@ SELECT ts_bgw_params_reset_time();
(1 row)

DROP MATERIALIZED VIEW test_continuous_agg_view;
psql:include/cagg_bgw_common.sql:234: NOTICE: drop cascades to table _timescaledb_internal._hyper_2_3_chunk
NOTICE: drop cascades to table _timescaledb_internal._hyper_2_3_chunk
CREATE MATERIALIZED VIEW test_continuous_agg_view
WITH (timescaledb.continuous,
timescaledb.materialized_only=true)
Expand Down Expand Up @@ -505,7 +491,7 @@ last_run_duration |

\x off
DROP MATERIALIZED VIEW test_continuous_agg_view;
psql:include/cagg_bgw_common.sql:294: NOTICE: drop cascades to table _timescaledb_internal._hyper_3_4_chunk
NOTICE: drop cascades to table _timescaledb_internal._hyper_3_4_chunk
--create a view with a function that it has no permission to execute
CREATE MATERIALIZED VIEW test_continuous_agg_view
WITH (timescaledb.continuous,
Expand Down Expand Up @@ -567,23 +553,14 @@ SELECT ts_bgw_params_reset_time();
-- Test creating continuous aggregate with a user that is the non-owner of the raw table
--
CREATE TABLE test_continuous_agg_table_w_grant(time int, data int);
\if :IS_DISTRIBUTED
SELECT create_distributed_hypertable('test_continuous_agg_table_w_grant', 'time', chunk_time_interval => 10, replication_factor => 2);
\else
SELECT create_hypertable('test_continuous_agg_table_w_grant', 'time', chunk_time_interval => 10);
psql:include/cagg_bgw_common.sql:332: NOTICE: adding not-null constraint to column "time"
NOTICE: adding not-null constraint to column "time"
create_hypertable
------------------------------------------------
(5,public,test_continuous_agg_table_w_grant,t)
(1 row)

\endif
CREATE OR REPLACE FUNCTION integer_now_test1() returns int LANGUAGE SQL STABLE as $$ SELECT coalesce(max(time), 0) FROM test_continuous_agg_table_w_grant $$;
\if :IS_DISTRIBUTED
CALL distributed_exec($DIST$
CREATE OR REPLACE FUNCTION integer_now_test1() returns int LANGUAGE SQL STABLE as $$ SELECT coalesce(max(time), 0) FROM test_continuous_agg_table_w_grant $$;
$DIST$);
\endif
SELECT set_integer_now_func('test_continuous_agg_table_w_grant', 'integer_now_test1');
set_integer_now_func
----------------------
Expand Down
33 changes: 5 additions & 28 deletions tsl/test/expected/cagg_bgw-16.out
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
-- 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 IS_DISTRIBUTED FALSE
\ir include/cagg_bgw_common.sql
-- 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.
--
-- Setup
--
Expand Down Expand Up @@ -78,26 +73,17 @@ SELECT * FROM _timescaledb_catalog.continuous_agg;

-- though user on access node has required GRANTS, this will propagate GRANTS to the connected data nodes
GRANT CREATE ON SCHEMA public TO :ROLE_DEFAULT_PERM_USER;
psql:include/cagg_bgw_common.sql:76: WARNING: no privileges were granted for "public"
WARNING: no privileges were granted for "public"
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
CREATE TABLE test_continuous_agg_table(time int, data int);
\if :IS_DISTRIBUTED
SELECT create_distributed_hypertable('test_continuous_agg_table', 'time', chunk_time_interval => 10, replication_factor => 2);
\else
SELECT create_hypertable('test_continuous_agg_table', 'time', chunk_time_interval => 10);
psql:include/cagg_bgw_common.sql:82: NOTICE: adding not-null constraint to column "time"
NOTICE: adding not-null constraint to column "time"
create_hypertable
----------------------------------------
(1,public,test_continuous_agg_table,t)
(1 row)

\endif
CREATE OR REPLACE FUNCTION integer_now_test() returns int LANGUAGE SQL STABLE as $$ SELECT coalesce(max(time), 0) FROM test_continuous_agg_table $$;
\if :IS_DISTRIBUTED
CALL distributed_exec($DIST$
CREATE OR REPLACE FUNCTION integer_now_test() returns int LANGUAGE SQL STABLE as $$ SELECT coalesce(max(time), 0) FROM test_continuous_agg_table $$;
$DIST$);
\endif
SELECT set_integer_now_func('test_continuous_agg_table', 'integer_now_test');
set_integer_now_func
----------------------
Expand Down Expand Up @@ -372,7 +358,7 @@ SELECT ts_bgw_params_reset_time();
(1 row)

DROP MATERIALIZED VIEW test_continuous_agg_view;
psql:include/cagg_bgw_common.sql:234: NOTICE: drop cascades to table _timescaledb_internal._hyper_2_3_chunk
NOTICE: drop cascades to table _timescaledb_internal._hyper_2_3_chunk
CREATE MATERIALIZED VIEW test_continuous_agg_view
WITH (timescaledb.continuous,
timescaledb.materialized_only=true)
Expand Down Expand Up @@ -505,7 +491,7 @@ last_run_duration |

\x off
DROP MATERIALIZED VIEW test_continuous_agg_view;
psql:include/cagg_bgw_common.sql:294: NOTICE: drop cascades to table _timescaledb_internal._hyper_3_4_chunk
NOTICE: drop cascades to table _timescaledb_internal._hyper_3_4_chunk
--create a view with a function that it has no permission to execute
CREATE MATERIALIZED VIEW test_continuous_agg_view
WITH (timescaledb.continuous,
Expand Down Expand Up @@ -567,23 +553,14 @@ SELECT ts_bgw_params_reset_time();
-- Test creating continuous aggregate with a user that is the non-owner of the raw table
--
CREATE TABLE test_continuous_agg_table_w_grant(time int, data int);
\if :IS_DISTRIBUTED
SELECT create_distributed_hypertable('test_continuous_agg_table_w_grant', 'time', chunk_time_interval => 10, replication_factor => 2);
\else
SELECT create_hypertable('test_continuous_agg_table_w_grant', 'time', chunk_time_interval => 10);
psql:include/cagg_bgw_common.sql:332: NOTICE: adding not-null constraint to column "time"
NOTICE: adding not-null constraint to column "time"
create_hypertable
------------------------------------------------
(5,public,test_continuous_agg_table_w_grant,t)
(1 row)

\endif
CREATE OR REPLACE FUNCTION integer_now_test1() returns int LANGUAGE SQL STABLE as $$ SELECT coalesce(max(time), 0) FROM test_continuous_agg_table_w_grant $$;
\if :IS_DISTRIBUTED
CALL distributed_exec($DIST$
CREATE OR REPLACE FUNCTION integer_now_test1() returns int LANGUAGE SQL STABLE as $$ SELECT coalesce(max(time), 0) FROM test_continuous_agg_table_w_grant $$;
$DIST$);
\endif
SELECT set_integer_now_func('test_continuous_agg_table_w_grant', 'integer_now_test1');
set_integer_now_func
----------------------
Expand Down