mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-17 19:13:16 +08:00
Use explicit timezone in tests
Don't depend on pg_regress timezone in our tests as this is gonna change with the next minor release of postgres. https://github.com/postgres/postgres/commit/b8ea0f67
This commit is contained in:
parent
2c3ff7aa6b
commit
ce58ce01f4
@ -5,6 +5,7 @@
|
|||||||
-- Setup
|
-- Setup
|
||||||
--
|
--
|
||||||
\c :TEST_DBNAME :ROLE_SUPERUSER
|
\c :TEST_DBNAME :ROLE_SUPERUSER
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
-- this mock_start_time doesnt seem to be used anywhere
|
-- this mock_start_time doesnt seem to be used anywhere
|
||||||
CREATE OR REPLACE FUNCTION ts_bgw_db_scheduler_test_run_and_wait_for_scheduler_finish(timeout INT = -1, mock_start_time INT = 0) RETURNS VOID
|
CREATE OR REPLACE FUNCTION ts_bgw_db_scheduler_test_run_and_wait_for_scheduler_finish(timeout INT = -1, mock_start_time INT = 0) RETURNS VOID
|
||||||
AS :MODULE_PATHNAME LANGUAGE C VOLATILE;
|
AS :MODULE_PATHNAME LANGUAGE C VOLATILE;
|
||||||
@ -93,6 +94,7 @@ $BODY$;
|
|||||||
DELETE FROM _timescaledb_config.bgw_job WHERE TRUE;
|
DELETE FROM _timescaledb_config.bgw_job WHERE TRUE;
|
||||||
TRUNCATE _timescaledb_internal.bgw_job_stat;
|
TRUNCATE _timescaledb_internal.bgw_job_stat;
|
||||||
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
CREATE TABLE public.bgw_log(
|
CREATE TABLE public.bgw_log(
|
||||||
msg_no INT,
|
msg_no INT,
|
||||||
mock_time BIGINT,
|
mock_time BIGINT,
|
||||||
@ -297,6 +299,7 @@ select * from _timescaledb_config.bgw_job;
|
|||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
--Tests that the scheduler start a job right away if it's the first time and there is no job_stat entry for it
|
--Tests that the scheduler start a job right away if it's the first time and there is no job_stat entry for it
|
||||||
SELECT ts_bgw_db_scheduler_test_run_and_wait_for_scheduler_finish(25);
|
SELECT ts_bgw_db_scheduler_test_run_and_wait_for_scheduler_finish(25);
|
||||||
ts_bgw_db_scheduler_test_run_and_wait_for_scheduler_finish
|
ts_bgw_db_scheduler_test_run_and_wait_for_scheduler_finish
|
||||||
@ -421,6 +424,7 @@ SELECT insert_job('test_job_2', 'bgw_test_job_2_error', INTERVAL '800ms', INTERV
|
|||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
--Run the first time and error
|
--Run the first time and error
|
||||||
SELECT ts_bgw_db_scheduler_test_run_and_wait_for_scheduler_finish(25);
|
SELECT ts_bgw_db_scheduler_test_run_and_wait_for_scheduler_finish(25);
|
||||||
ts_bgw_db_scheduler_test_run_and_wait_for_scheduler_finish
|
ts_bgw_db_scheduler_test_run_and_wait_for_scheduler_finish
|
||||||
@ -1244,6 +1248,7 @@ SELECT _timescaledb_functions.stop_background_workers();
|
|||||||
t
|
t
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
CREATE OR REPLACE FUNCTION ts_test_job_refresh() RETURNS TABLE(
|
CREATE OR REPLACE FUNCTION ts_test_job_refresh() RETURNS TABLE(
|
||||||
id INTEGER,
|
id INTEGER,
|
||||||
application_name NAME,
|
application_name NAME,
|
||||||
|
@ -22,6 +22,7 @@ SELECT table_name FROM create_hypertable('conditions', 'timec');
|
|||||||
|
|
||||||
-- schema tests
|
-- schema tests
|
||||||
\c :TEST_DBNAME :ROLE_CLUSTER_SUPERUSER
|
\c :TEST_DBNAME :ROLE_CLUSTER_SUPERUSER
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
-- drop if the tablespace1 and/or tablespace2 exists
|
-- drop if the tablespace1 and/or tablespace2 exists
|
||||||
SET client_min_messages TO error;
|
SET client_min_messages TO error;
|
||||||
DROP TABLESPACE IF EXISTS tablespace1;
|
DROP TABLESPACE IF EXISTS tablespace1;
|
||||||
|
@ -22,6 +22,7 @@ SELECT table_name FROM create_hypertable('conditions', 'timec');
|
|||||||
|
|
||||||
-- schema tests
|
-- schema tests
|
||||||
\c :TEST_DBNAME :ROLE_CLUSTER_SUPERUSER
|
\c :TEST_DBNAME :ROLE_CLUSTER_SUPERUSER
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
-- drop if the tablespace1 and/or tablespace2 exists
|
-- drop if the tablespace1 and/or tablespace2 exists
|
||||||
SET client_min_messages TO error;
|
SET client_min_messages TO error;
|
||||||
DROP TABLESPACE IF EXISTS tablespace1;
|
DROP TABLESPACE IF EXISTS tablespace1;
|
||||||
|
@ -22,6 +22,7 @@ SELECT table_name FROM create_hypertable('conditions', 'timec');
|
|||||||
|
|
||||||
-- schema tests
|
-- schema tests
|
||||||
\c :TEST_DBNAME :ROLE_CLUSTER_SUPERUSER
|
\c :TEST_DBNAME :ROLE_CLUSTER_SUPERUSER
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
-- drop if the tablespace1 and/or tablespace2 exists
|
-- drop if the tablespace1 and/or tablespace2 exists
|
||||||
SET client_min_messages TO error;
|
SET client_min_messages TO error;
|
||||||
DROP TABLESPACE IF EXISTS tablespace1;
|
DROP TABLESPACE IF EXISTS tablespace1;
|
||||||
|
@ -22,6 +22,7 @@ SELECT table_name FROM create_hypertable('conditions', 'timec');
|
|||||||
|
|
||||||
-- schema tests
|
-- schema tests
|
||||||
\c :TEST_DBNAME :ROLE_CLUSTER_SUPERUSER
|
\c :TEST_DBNAME :ROLE_CLUSTER_SUPERUSER
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
-- drop if the tablespace1 and/or tablespace2 exists
|
-- drop if the tablespace1 and/or tablespace2 exists
|
||||||
SET client_min_messages TO error;
|
SET client_min_messages TO error;
|
||||||
DROP TABLESPACE IF EXISTS tablespace1;
|
DROP TABLESPACE IF EXISTS tablespace1;
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
-- Please see the included NOTICE for copyright information and
|
-- Please see the included NOTICE for copyright information and
|
||||||
-- LICENSE-TIMESCALE for a copy of the license.
|
-- LICENSE-TIMESCALE for a copy of the license.
|
||||||
\c :TEST_DBNAME :ROLE_SUPERUSER
|
\c :TEST_DBNAME :ROLE_SUPERUSER
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
--
|
--
|
||||||
-- Check that drop chunks with a unique constraint works as expected.
|
-- Check that drop chunks with a unique constraint works as expected.
|
||||||
--
|
--
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
-- This file and its contents are licensed under the Timescale License.
|
-- This file and its contents are licensed under the Timescale License.
|
||||||
-- Please see the included NOTICE for copyright information and
|
-- Please see the included NOTICE for copyright information and
|
||||||
-- LICENSE-TIMESCALE for a copy of the license.
|
-- LICENSE-TIMESCALE for a copy of the license.
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
CREATE TYPE custom_type AS (high int, low int);
|
CREATE TYPE custom_type AS (high int, low int);
|
||||||
CREATE TABLE conditions_before (
|
CREATE TABLE conditions_before (
|
||||||
timec TIMESTAMPTZ NOT NULL,
|
timec TIMESTAMPTZ NOT NULL,
|
||||||
@ -158,6 +159,7 @@ SELECT _timescaledb_functions.stop_background_workers();
|
|||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
--make sure the appropriate DROP are still blocked.
|
--make sure the appropriate DROP are still blocked.
|
||||||
\set ON_ERROR_STOP 0
|
\set ON_ERROR_STOP 0
|
||||||
DROP table :"MAT_SCHEMA_NAME".:"MAT_TABLE_NAME";
|
DROP table :"MAT_SCHEMA_NAME".:"MAT_TABLE_NAME";
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
-- LICENSE-TIMESCALE for a copy of the license.
|
-- LICENSE-TIMESCALE for a copy of the license.
|
||||||
\set ON_ERROR_STOP 0
|
\set ON_ERROR_STOP 0
|
||||||
\set VERBOSITY default
|
\set VERBOSITY default
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
--negative tests for query validation
|
--negative tests for query validation
|
||||||
create table mat_t1( a integer, b integer,c TEXT);
|
create table mat_t1( a integer, b integer,c TEXT);
|
||||||
CREATE TABLE conditions (
|
CREATE TABLE conditions (
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
-- Please see the included NOTICE for copyright information and
|
-- Please see the included NOTICE for copyright information and
|
||||||
-- LICENSE-TIMESCALE for a copy of the license.
|
-- LICENSE-TIMESCALE for a copy of the license.
|
||||||
\set VERBOSITY default
|
\set VERBOSITY default
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
CREATE TABLE conditions(
|
CREATE TABLE conditions(
|
||||||
day TIMESTAMPTZ NOT NULL,
|
day TIMESTAMPTZ NOT NULL,
|
||||||
city text NOT NULL,
|
city text NOT NULL,
|
||||||
@ -1227,6 +1228,7 @@ ALTER USER MAPPING FOR :ROLE_DEFAULT_PERM_USER
|
|||||||
OPTIONS (ADD password_required 'false');
|
OPTIONS (ADD password_required 'false');
|
||||||
GRANT USAGE ON FOREIGN SERVER loopback TO :ROLE_DEFAULT_PERM_USER;
|
GRANT USAGE ON FOREIGN SERVER loopback TO :ROLE_DEFAULT_PERM_USER;
|
||||||
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER;
|
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER;
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
CREATE FOREIGN TABLE devices_fdw (
|
CREATE FOREIGN TABLE devices_fdw (
|
||||||
device_id int not null,
|
device_id int not null,
|
||||||
name text,
|
name text,
|
||||||
|
@ -36,6 +36,7 @@ SELECT a, count(b)
|
|||||||
FROM int_tab
|
FROM int_tab
|
||||||
GROUP BY time_bucket(1, a), a WITH NO DATA;
|
GROUP BY time_bucket(1, a), a WITH NO DATA;
|
||||||
\c :TEST_DBNAME :ROLE_SUPERUSER
|
\c :TEST_DBNAME :ROLE_SUPERUSER
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
DELETE FROM _timescaledb_config.bgw_job WHERE TRUE;
|
DELETE FROM _timescaledb_config.bgw_job WHERE TRUE;
|
||||||
SET ROLE :ROLE_DEFAULT_PERM_USER;
|
SET ROLE :ROLE_DEFAULT_PERM_USER;
|
||||||
SELECT count(*) FROM _timescaledb_config.bgw_job;
|
SELECT count(*) FROM _timescaledb_config.bgw_job;
|
||||||
@ -260,6 +261,7 @@ SELECT hypertable_id as mat_id FROM _timescaledb_config.bgw_job where id = :job_
|
|||||||
\set VERBOSITY terse
|
\set VERBOSITY terse
|
||||||
\set ON_ERROR_STOP 1
|
\set ON_ERROR_STOP 1
|
||||||
\c :TEST_DBNAME :ROLE_SUPERUSER
|
\c :TEST_DBNAME :ROLE_SUPERUSER
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
UPDATE _timescaledb_config.bgw_job
|
UPDATE _timescaledb_config.bgw_job
|
||||||
SET config = jsonb_build_object('mat_hypertable_id', :mat_id)
|
SET config = jsonb_build_object('mat_hypertable_id', :mat_id)
|
||||||
WHERE id = :job_id;
|
WHERE id = :job_id;
|
||||||
@ -822,6 +824,7 @@ WHERE id = :job_id;
|
|||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
\c :TEST_DBNAME :ROLE_SUPERUSER
|
\c :TEST_DBNAME :ROLE_SUPERUSER
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
UPDATE _timescaledb_config.bgw_job
|
UPDATE _timescaledb_config.bgw_job
|
||||||
SET config = jsonb_build_object('mat_hypertable_id', :mat_id)
|
SET config = jsonb_build_object('mat_hypertable_id', :mat_id)
|
||||||
WHERE id = :job_id;
|
WHERE id = :job_id;
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
-- LICENSE-TIMESCALE for a copy of the license.
|
-- LICENSE-TIMESCALE for a copy of the license.
|
||||||
-- Connect as superuser to use SET ROLE later
|
-- Connect as superuser to use SET ROLE later
|
||||||
\c :TEST_DBNAME :ROLE_CLUSTER_SUPERUSER
|
\c :TEST_DBNAME :ROLE_CLUSTER_SUPERUSER
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
-- Run tests with default role
|
-- Run tests with default role
|
||||||
SET ROLE :ROLE_DEFAULT_PERM_USER;
|
SET ROLE :ROLE_DEFAULT_PERM_USER;
|
||||||
\set TEST_BASE_NAME cagg_query
|
\set TEST_BASE_NAME cagg_query
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
-- LICENSE-TIMESCALE for a copy of the license.
|
-- LICENSE-TIMESCALE for a copy of the license.
|
||||||
-- Connect as superuser to use SET ROLE later
|
-- Connect as superuser to use SET ROLE later
|
||||||
\c :TEST_DBNAME :ROLE_CLUSTER_SUPERUSER
|
\c :TEST_DBNAME :ROLE_CLUSTER_SUPERUSER
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
-- Run tests with default role
|
-- Run tests with default role
|
||||||
SET ROLE :ROLE_DEFAULT_PERM_USER;
|
SET ROLE :ROLE_DEFAULT_PERM_USER;
|
||||||
-- Enable MERGE statements for continuous aggregate refresh
|
-- Enable MERGE statements for continuous aggregate refresh
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
-- This file and its contents are licensed under the Timescale License.
|
-- This file and its contents are licensed under the Timescale License.
|
||||||
-- Please see the included NOTICE for copyright information and
|
-- Please see the included NOTICE for copyright information and
|
||||||
-- LICENSE-TIMESCALE for a copy of the license.
|
-- LICENSE-TIMESCALE for a copy of the license.
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
\ir include/cagg_refresh_common.sql
|
\ir include/cagg_refresh_common.sql
|
||||||
-- This file and its contents are licensed under the Timescale License.
|
-- This file and its contents are licensed under the Timescale License.
|
||||||
-- Please see the included NOTICE for copyright information and
|
-- Please see the included NOTICE for copyright information and
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
-- LICENSE-TIMESCALE for a copy of the license.
|
-- LICENSE-TIMESCALE for a copy of the license.
|
||||||
-- Enable MERGE statements for continuous aggregate refresh
|
-- Enable MERGE statements for continuous aggregate refresh
|
||||||
SET timescaledb.enable_merge_on_cagg_refresh TO ON;
|
SET timescaledb.enable_merge_on_cagg_refresh TO ON;
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
\ir include/cagg_refresh_common.sql
|
\ir include/cagg_refresh_common.sql
|
||||||
-- This file and its contents are licensed under the Timescale License.
|
-- This file and its contents are licensed under the Timescale License.
|
||||||
-- Please see the included NOTICE for copyright information and
|
-- Please see the included NOTICE for copyright information and
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
-- Please see the included NOTICE for copyright information and
|
-- Please see the included NOTICE for copyright information and
|
||||||
-- LICENSE-TIMESCALE for a copy of the license.
|
-- LICENSE-TIMESCALE for a copy of the license.
|
||||||
\c :TEST_DBNAME :ROLE_SUPERUSER
|
\c :TEST_DBNAME :ROLE_SUPERUSER
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
CREATE PROCEDURE _timescaledb_internal.cagg_try_repair (
|
CREATE PROCEDURE _timescaledb_internal.cagg_try_repair (
|
||||||
cagg_view REGCLASS,
|
cagg_view REGCLASS,
|
||||||
force_rebuild BOOLEAN
|
force_rebuild BOOLEAN
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
-- Please see the included NOTICE for copyright information and
|
-- Please see the included NOTICE for copyright information and
|
||||||
-- LICENSE-TIMESCALE for a copy of the license.
|
-- LICENSE-TIMESCALE for a copy of the license.
|
||||||
\c :TEST_DBNAME :ROLE_SUPERUSER
|
\c :TEST_DBNAME :ROLE_SUPERUSER
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
CREATE PROCEDURE _timescaledb_internal.cagg_try_repair (
|
CREATE PROCEDURE _timescaledb_internal.cagg_try_repair (
|
||||||
cagg_view REGCLASS,
|
cagg_view REGCLASS,
|
||||||
force_rebuild BOOLEAN
|
force_rebuild BOOLEAN
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
-- Please see the included NOTICE for copyright information and
|
-- Please see the included NOTICE for copyright information and
|
||||||
-- LICENSE-TIMESCALE for a copy of the license.
|
-- LICENSE-TIMESCALE for a copy of the license.
|
||||||
\c :TEST_DBNAME :ROLE_SUPERUSER
|
\c :TEST_DBNAME :ROLE_SUPERUSER
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
CREATE PROCEDURE _timescaledb_internal.cagg_try_repair (
|
CREATE PROCEDURE _timescaledb_internal.cagg_try_repair (
|
||||||
cagg_view REGCLASS,
|
cagg_view REGCLASS,
|
||||||
force_rebuild BOOLEAN
|
force_rebuild BOOLEAN
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
-- Please see the included NOTICE for copyright information and
|
-- Please see the included NOTICE for copyright information and
|
||||||
-- LICENSE-TIMESCALE for a copy of the license.
|
-- LICENSE-TIMESCALE for a copy of the license.
|
||||||
\c :TEST_DBNAME :ROLE_SUPERUSER
|
\c :TEST_DBNAME :ROLE_SUPERUSER
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
CREATE PROCEDURE _timescaledb_internal.cagg_try_repair (
|
CREATE PROCEDURE _timescaledb_internal.cagg_try_repair (
|
||||||
cagg_view REGCLASS,
|
cagg_view REGCLASS,
|
||||||
force_rebuild BOOLEAN
|
force_rebuild BOOLEAN
|
||||||
|
@ -10,6 +10,7 @@ SELECT _timescaledb_functions.stop_background_workers();
|
|||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
\set PREFIX 'EXPLAIN (analyze, costs off, timing off, summary off)'
|
\set PREFIX 'EXPLAIN (analyze, costs off, timing off, summary off)'
|
||||||
CREATE TABLE metrics(f1 int, f2 int, time timestamptz NOT NULL, device_id int, value float);
|
CREATE TABLE metrics(f1 int, f2 int, time timestamptz NOT NULL, device_id int, value float);
|
||||||
SELECT create_hypertable('metrics','time');
|
SELECT create_hypertable('metrics','time');
|
||||||
|
@ -10,6 +10,7 @@ SELECT _timescaledb_functions.stop_background_workers();
|
|||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
\set PREFIX 'EXPLAIN (analyze, costs off, timing off, summary off)'
|
\set PREFIX 'EXPLAIN (analyze, costs off, timing off, summary off)'
|
||||||
CREATE TABLE metrics(f1 int, f2 int, time timestamptz NOT NULL, device_id int, value float);
|
CREATE TABLE metrics(f1 int, f2 int, time timestamptz NOT NULL, device_id int, value float);
|
||||||
SELECT create_hypertable('metrics','time');
|
SELECT create_hypertable('metrics','time');
|
||||||
|
@ -10,6 +10,7 @@ SELECT _timescaledb_functions.stop_background_workers();
|
|||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
\set PREFIX 'EXPLAIN (analyze, costs off, timing off, summary off)'
|
\set PREFIX 'EXPLAIN (analyze, costs off, timing off, summary off)'
|
||||||
CREATE TABLE metrics(f1 int, f2 int, time timestamptz NOT NULL, device_id int, value float);
|
CREATE TABLE metrics(f1 int, f2 int, time timestamptz NOT NULL, device_id int, value float);
|
||||||
SELECT create_hypertable('metrics','time');
|
SELECT create_hypertable('metrics','time');
|
||||||
|
@ -10,6 +10,7 @@ SELECT _timescaledb_functions.stop_background_workers();
|
|||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
\set PREFIX 'EXPLAIN (analyze, costs off, timing off, summary off)'
|
\set PREFIX 'EXPLAIN (analyze, costs off, timing off, summary off)'
|
||||||
CREATE TABLE metrics(f1 int, f2 int, time timestamptz NOT NULL, device_id int, value float);
|
CREATE TABLE metrics(f1 int, f2 int, time timestamptz NOT NULL, device_id int, value float);
|
||||||
SELECT create_hypertable('metrics','time');
|
SELECT create_hypertable('metrics','time');
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
\set ON_ERROR_STOP 0
|
\set ON_ERROR_STOP 0
|
||||||
SET client_min_messages TO NOTICE;
|
SET client_min_messages TO NOTICE;
|
||||||
SET work_mem TO '64MB';
|
SET work_mem TO '64MB';
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
-- START OF USAGE TEST --
|
-- START OF USAGE TEST --
|
||||||
--First create your hypertable
|
--First create your hypertable
|
||||||
CREATE TABLE device_readings (
|
CREATE TABLE device_readings (
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
\set ON_ERROR_STOP 0
|
\set ON_ERROR_STOP 0
|
||||||
SET client_min_messages TO NOTICE;
|
SET client_min_messages TO NOTICE;
|
||||||
SET work_mem TO '64MB';
|
SET work_mem TO '64MB';
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
-- START OF USAGE TEST --
|
-- START OF USAGE TEST --
|
||||||
--First create your hypertable
|
--First create your hypertable
|
||||||
CREATE TABLE device_readings (
|
CREATE TABLE device_readings (
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
\set ON_ERROR_STOP 0
|
\set ON_ERROR_STOP 0
|
||||||
SET client_min_messages TO NOTICE;
|
SET client_min_messages TO NOTICE;
|
||||||
SET work_mem TO '64MB';
|
SET work_mem TO '64MB';
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
-- START OF USAGE TEST --
|
-- START OF USAGE TEST --
|
||||||
--First create your hypertable
|
--First create your hypertable
|
||||||
CREATE TABLE device_readings (
|
CREATE TABLE device_readings (
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
\set ON_ERROR_STOP 0
|
\set ON_ERROR_STOP 0
|
||||||
SET client_min_messages TO NOTICE;
|
SET client_min_messages TO NOTICE;
|
||||||
SET work_mem TO '64MB';
|
SET work_mem TO '64MB';
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
-- START OF USAGE TEST --
|
-- START OF USAGE TEST --
|
||||||
--First create your hypertable
|
--First create your hypertable
|
||||||
CREATE TABLE device_readings (
|
CREATE TABLE device_readings (
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
-- Please see the included NOTICE for copyright information and
|
-- Please see the included NOTICE for copyright information and
|
||||||
-- LICENSE-TIMESCALE for a copy of the license.
|
-- LICENSE-TIMESCALE for a copy of the license.
|
||||||
SET search_path TO public, _timescaledb_functions;
|
SET search_path TO public, _timescaledb_functions;
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
CREATE TABLE devices (
|
CREATE TABLE devices (
|
||||||
id INTEGER,
|
id INTEGER,
|
||||||
name TEXT
|
name TEXT
|
||||||
@ -263,6 +264,7 @@ CREATE OR REPLACE FUNCTION cagg_get_bucket_function(
|
|||||||
mat_hypertable_id INTEGER
|
mat_hypertable_id INTEGER
|
||||||
) RETURNS regprocedure AS :MODULE_PATHNAME, 'ts_continuous_agg_get_bucket_function' LANGUAGE C STRICT VOLATILE;
|
) RETURNS regprocedure AS :MODULE_PATHNAME, 'ts_continuous_agg_get_bucket_function' LANGUAGE C STRICT VOLATILE;
|
||||||
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
CREATE TABLE timestamp_ht (
|
CREATE TABLE timestamp_ht (
|
||||||
time timestamp NOT NULL,
|
time timestamp NOT NULL,
|
||||||
value float
|
value float
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
-- This file and its contents are licensed under the Timescale License.
|
-- This file and its contents are licensed under the Timescale License.
|
||||||
-- Please see the included NOTICE for copyright information and
|
-- Please see the included NOTICE for copyright information and
|
||||||
-- LICENSE-TIMESCALE for a copy of the license.
|
-- LICENSE-TIMESCALE for a copy of the license.
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
\set EXPLAIN_ANALYZE 'EXPLAIN (analyze,costs off,timing off,summary off)'
|
\set EXPLAIN_ANALYZE 'EXPLAIN (analyze,costs off,timing off,summary off)'
|
||||||
CREATE TABLE continuous_agg_test(time int, data int);
|
CREATE TABLE continuous_agg_test(time int, data int);
|
||||||
SELECT create_hypertable('continuous_agg_test', 'time', chunk_time_interval=> 10);
|
SELECT create_hypertable('continuous_agg_test', 'time', chunk_time_interval=> 10);
|
||||||
@ -74,6 +75,7 @@ SELECT * from _timescaledb_catalog.continuous_aggs_hypertable_invalidation_log;
|
|||||||
\c :TEST_DBNAME :ROLE_SUPERUSER
|
\c :TEST_DBNAME :ROLE_SUPERUSER
|
||||||
INSERT INTO _timescaledb_catalog.continuous_aggs_invalidation_threshold VALUES (1, 15);
|
INSERT INTO _timescaledb_catalog.continuous_aggs_invalidation_threshold VALUES (1, 15);
|
||||||
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
INSERT INTO continuous_agg_test VALUES (10, 1), (11, 2), (21, 3), (22, 4);
|
INSERT INTO continuous_agg_test VALUES (10, 1), (11, 2), (21, 3), (22, 4);
|
||||||
SELECT * FROM _timescaledb_catalog.continuous_aggs_invalidation_threshold;
|
SELECT * FROM _timescaledb_catalog.continuous_aggs_invalidation_threshold;
|
||||||
hypertable_id | watermark
|
hypertable_id | watermark
|
||||||
@ -347,6 +349,7 @@ UPDATE _timescaledb_catalog.continuous_aggs_invalidation_threshold
|
|||||||
SET watermark = 2
|
SET watermark = 2
|
||||||
WHERE hypertable_id = 5;
|
WHERE hypertable_id = 5;
|
||||||
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
INSERT INTO ts_continuous_test VALUES (1, 1);
|
INSERT INTO ts_continuous_test VALUES (1, 1);
|
||||||
SELECT * FROM _timescaledb_catalog.continuous_aggs_invalidation_threshold;
|
SELECT * FROM _timescaledb_catalog.continuous_aggs_invalidation_threshold;
|
||||||
hypertable_id | watermark
|
hypertable_id | watermark
|
||||||
|
@ -6,6 +6,7 @@ CREATE OR REPLACE FUNCTION _timescaledb_internal.test_merge_chunks_on_dimension(
|
|||||||
RETURNS VOID
|
RETURNS VOID
|
||||||
AS :TSL_MODULE_PATHNAME, 'ts_test_merge_chunks_on_dimension' LANGUAGE C VOLATILE;
|
AS :TSL_MODULE_PATHNAME, 'ts_test_merge_chunks_on_dimension' LANGUAGE C VOLATILE;
|
||||||
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
CREATE TABLE test1 ("Time" timestamptz, i integer, value integer);
|
CREATE TABLE test1 ("Time" timestamptz, i integer, value integer);
|
||||||
SELECT table_name FROM Create_hypertable('test1', 'Time', chunk_time_interval=> INTERVAL '1 hour');
|
SELECT table_name FROM Create_hypertable('test1', 'Time', chunk_time_interval=> INTERVAL '1 hour');
|
||||||
NOTICE: adding not-null constraint to column "Time"
|
NOTICE: adding not-null constraint to column "Time"
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
-- Please see the included NOTICE for copyright information and
|
-- Please see the included NOTICE for copyright information and
|
||||||
-- LICENSE-TIMESCALE for a copy of the license.
|
-- LICENSE-TIMESCALE for a copy of the license.
|
||||||
SET timescaledb.enable_transparent_decompression to OFF;
|
SET timescaledb.enable_transparent_decompression to OFF;
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
\set PREFIX 'EXPLAIN (analyze, verbose, costs off, timing off, summary off)'
|
\set PREFIX 'EXPLAIN (analyze, verbose, costs off, timing off, summary off)'
|
||||||
\ir include/rand_generator.sql
|
\ir include/rand_generator.sql
|
||||||
-- This file and its contents are licensed under the Timescale License.
|
-- This file and its contents are licensed under the Timescale License.
|
||||||
@ -1497,6 +1498,7 @@ SET reltuples = 0, relpages = 0
|
|||||||
WHERE ht.table_name = 'stattest2' AND ch.hypertable_id = ht.id
|
WHERE ht.table_name = 'stattest2' AND ch.hypertable_id = ht.id
|
||||||
AND ch.compressed_chunk_id > 0 );
|
AND ch.compressed_chunk_id > 0 );
|
||||||
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
-- reltuples is initially -1 on PG14 before VACUUM/ANALYZE has been run
|
-- reltuples is initially -1 on PG14 before VACUUM/ANALYZE has been run
|
||||||
SELECT relname, CASE WHEN reltuples > 0 THEN reltuples ELSE 0 END AS reltuples, relpages, relallvisible FROM pg_class
|
SELECT relname, CASE WHEN reltuples > 0 THEN reltuples ELSE 0 END AS reltuples, relpages, relallvisible FROM pg_class
|
||||||
WHERE relname in ( SELECT ch.table_name FROM
|
WHERE relname in ( SELECT ch.table_name FROM
|
||||||
|
@ -7,6 +7,7 @@ CREATE ROLE NOLOGIN_ROLE WITH nologin noinherit;
|
|||||||
GRANT CREATE ON SCHEMA public TO NOLOGIN_ROLE;
|
GRANT CREATE ON SCHEMA public TO NOLOGIN_ROLE;
|
||||||
GRANT NOLOGIN_ROLE TO :ROLE_DEFAULT_PERM_USER WITH ADMIN OPTION;
|
GRANT NOLOGIN_ROLE TO :ROLE_DEFAULT_PERM_USER WITH ADMIN OPTION;
|
||||||
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
CREATE TABLE conditions (
|
CREATE TABLE conditions (
|
||||||
time TIMESTAMPTZ NOT NULL,
|
time TIMESTAMPTZ NOT NULL,
|
||||||
location TEXT NOT NULL,
|
location TEXT NOT NULL,
|
||||||
@ -286,6 +287,7 @@ ERROR: permission denied to start background process as role "nologin_role"
|
|||||||
DROP TABLE test_table_nologin;
|
DROP TABLE test_table_nologin;
|
||||||
RESET ROLE;
|
RESET ROLE;
|
||||||
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
CREATE TABLE conditions(
|
CREATE TABLE conditions(
|
||||||
time TIMESTAMPTZ NOT NULL,
|
time TIMESTAMPTZ NOT NULL,
|
||||||
device INTEGER,
|
device INTEGER,
|
||||||
|
@ -30,6 +30,7 @@ SET client_min_messages = NOTICE;
|
|||||||
CREATE TABLESPACE tablespace1 OWNER :ROLE_DEFAULT_PERM_USER LOCATION :TEST_TABLESPACE1_PATH;
|
CREATE TABLESPACE tablespace1 OWNER :ROLE_DEFAULT_PERM_USER LOCATION :TEST_TABLESPACE1_PATH;
|
||||||
CREATE TABLESPACE tablespace2 OWNER :ROLE_DEFAULT_PERM_USER LOCATION :TEST_TABLESPACE2_PATH;
|
CREATE TABLESPACE tablespace2 OWNER :ROLE_DEFAULT_PERM_USER LOCATION :TEST_TABLESPACE2_PATH;
|
||||||
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
CREATE TABLE test1 ("Time" timestamptz, i integer, b bigint, t text);
|
CREATE TABLE test1 ("Time" timestamptz, i integer, b bigint, t text);
|
||||||
SELECT table_name from create_hypertable('test1', 'Time', chunk_time_interval=> INTERVAL '1 day');
|
SELECT table_name from create_hypertable('test1', 'Time', chunk_time_interval=> INTERVAL '1 day');
|
||||||
NOTICE: adding not-null constraint to column "Time"
|
NOTICE: adding not-null constraint to column "Time"
|
||||||
@ -562,6 +563,7 @@ SELECT count(*) FROM test1_cont_view;
|
|||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
\c :TEST_DBNAME :ROLE_SUPERUSER
|
\c :TEST_DBNAME :ROLE_SUPERUSER
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
SELECT chunk.schema_name|| '.' || chunk.table_name as "COMPRESSED_CHUNK_NAME"
|
SELECT chunk.schema_name|| '.' || chunk.table_name as "COMPRESSED_CHUNK_NAME"
|
||||||
FROM _timescaledb_catalog.chunk chunk
|
FROM _timescaledb_catalog.chunk chunk
|
||||||
INNER JOIN _timescaledb_catalog.hypertable comp_hyper ON (chunk.hypertable_id = comp_hyper.id)
|
INNER JOIN _timescaledb_catalog.hypertable comp_hyper ON (chunk.hypertable_id = comp_hyper.id)
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
-- This file and its contents are licensed under the Timescale License.
|
-- This file and its contents are licensed under the Timescale License.
|
||||||
-- Please see the included NOTICE for copyright information and
|
-- Please see the included NOTICE for copyright information and
|
||||||
-- LICENSE-TIMESCALE for a copy of the license.
|
-- LICENSE-TIMESCALE for a copy of the license.
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
\set PREFIX 'EXPLAIN (costs off, summary off, timing off) '
|
\set PREFIX 'EXPLAIN (costs off, summary off, timing off) '
|
||||||
\set ANALYZE 'EXPLAIN (analyze, costs off, summary off, timing off) '
|
\set ANALYZE 'EXPLAIN (analyze, costs off, summary off, timing off) '
|
||||||
CREATE TABLE test1 (timec timestamptz , i integer ,
|
CREATE TABLE test1 (timec timestamptz , i integer ,
|
||||||
|
@ -755,6 +755,7 @@ INNER JOIN _timescaledb_catalog.hypertable h ON(h.id = ca.mat_hypertable_id)
|
|||||||
WHERE user_view_name = 'mat_drop_test'
|
WHERE user_view_name = 'mat_drop_test'
|
||||||
\gset
|
\gset
|
||||||
SET client_min_messages TO NOTICE;
|
SET client_min_messages TO NOTICE;
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
CALL refresh_continuous_aggregate('mat_drop_test', NULL, NULL);
|
CALL refresh_continuous_aggregate('mat_drop_test', NULL, NULL);
|
||||||
--force invalidation
|
--force invalidation
|
||||||
insert into conditions
|
insert into conditions
|
||||||
|
@ -755,6 +755,7 @@ INNER JOIN _timescaledb_catalog.hypertable h ON(h.id = ca.mat_hypertable_id)
|
|||||||
WHERE user_view_name = 'mat_drop_test'
|
WHERE user_view_name = 'mat_drop_test'
|
||||||
\gset
|
\gset
|
||||||
SET client_min_messages TO NOTICE;
|
SET client_min_messages TO NOTICE;
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
CALL refresh_continuous_aggregate('mat_drop_test', NULL, NULL);
|
CALL refresh_continuous_aggregate('mat_drop_test', NULL, NULL);
|
||||||
--force invalidation
|
--force invalidation
|
||||||
insert into conditions
|
insert into conditions
|
||||||
|
@ -755,6 +755,7 @@ INNER JOIN _timescaledb_catalog.hypertable h ON(h.id = ca.mat_hypertable_id)
|
|||||||
WHERE user_view_name = 'mat_drop_test'
|
WHERE user_view_name = 'mat_drop_test'
|
||||||
\gset
|
\gset
|
||||||
SET client_min_messages TO NOTICE;
|
SET client_min_messages TO NOTICE;
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
CALL refresh_continuous_aggregate('mat_drop_test', NULL, NULL);
|
CALL refresh_continuous_aggregate('mat_drop_test', NULL, NULL);
|
||||||
--force invalidation
|
--force invalidation
|
||||||
insert into conditions
|
insert into conditions
|
||||||
|
@ -755,6 +755,7 @@ INNER JOIN _timescaledb_catalog.hypertable h ON(h.id = ca.mat_hypertable_id)
|
|||||||
WHERE user_view_name = 'mat_drop_test'
|
WHERE user_view_name = 'mat_drop_test'
|
||||||
\gset
|
\gset
|
||||||
SET client_min_messages TO NOTICE;
|
SET client_min_messages TO NOTICE;
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
CALL refresh_continuous_aggregate('mat_drop_test', NULL, NULL);
|
CALL refresh_continuous_aggregate('mat_drop_test', NULL, NULL);
|
||||||
--force invalidation
|
--force invalidation
|
||||||
insert into conditions
|
insert into conditions
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
-- Please see the included NOTICE for copyright information and
|
-- Please see the included NOTICE for copyright information and
|
||||||
-- LICENSE-TIMESCALE for a copy of the license.
|
-- LICENSE-TIMESCALE for a copy of the license.
|
||||||
\c :TEST_DBNAME :ROLE_SUPERUSER
|
\c :TEST_DBNAME :ROLE_SUPERUSER
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
-- hypertable creation
|
-- hypertable creation
|
||||||
SHOW timescaledb.enable_hypertable_create;
|
SHOW timescaledb.enable_hypertable_create;
|
||||||
timescaledb.enable_hypertable_create
|
timescaledb.enable_hypertable_create
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
-- This file and its contents are licensed under the Timescale License.
|
-- This file and its contents are licensed under the Timescale License.
|
||||||
-- Please see the included NOTICE for copyright information and
|
-- Please see the included NOTICE for copyright information and
|
||||||
-- LICENSE-TIMESCALE for a copy of the license.
|
-- LICENSE-TIMESCALE for a copy of the license.
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
CREATE TABLE sensor_data(
|
CREATE TABLE sensor_data(
|
||||||
time timestamptz not null,
|
time timestamptz not null,
|
||||||
sensor_id integer not null,
|
sensor_id integer not null,
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
-- This file and its contents are licensed under the Timescale License.
|
-- This file and its contents are licensed under the Timescale License.
|
||||||
-- Please see the included NOTICE for copyright information and
|
-- Please see the included NOTICE for copyright information and
|
||||||
-- LICENSE-TIMESCALE for a copy of the license.
|
-- LICENSE-TIMESCALE for a copy of the license.
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
\set TEST_BASE_NAME jit
|
\set TEST_BASE_NAME jit
|
||||||
SELECT format('include/%s_load.sql', :'TEST_BASE_NAME') as "TEST_LOAD_NAME",
|
SELECT format('include/%s_load.sql', :'TEST_BASE_NAME') as "TEST_LOAD_NAME",
|
||||||
format('include/%s_query.sql', :'TEST_BASE_NAME') as "TEST_QUERY_NAME",
|
format('include/%s_query.sql', :'TEST_BASE_NAME') as "TEST_QUERY_NAME",
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
-- This file and its contents are licensed under the Timescale License.
|
-- This file and its contents are licensed under the Timescale License.
|
||||||
-- Please see the included NOTICE for copyright information and
|
-- Please see the included NOTICE for copyright information and
|
||||||
-- LICENSE-TIMESCALE for a copy of the license.
|
-- LICENSE-TIMESCALE for a copy of the license.
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
-- Prepare test data for continuous aggregate size function tests
|
-- Prepare test data for continuous aggregate size function tests
|
||||||
CREATE TABLE hypersize(time timestamptz, device int);
|
CREATE TABLE hypersize(time timestamptz, device int);
|
||||||
SELECT * FROM create_hypertable('hypersize', 'time');
|
SELECT * FROM create_hypertable('hypersize', 'time');
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
-- LICENSE-TIMESCALE for a copy of the license.
|
-- LICENSE-TIMESCALE for a copy of the license.
|
||||||
--telemetry tests that require a community license
|
--telemetry tests that require a community license
|
||||||
\c :TEST_DBNAME :ROLE_CLUSTER_SUPERUSER;
|
\c :TEST_DBNAME :ROLE_CLUSTER_SUPERUSER;
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
-- function call info size is too variable for this test, so disable it
|
-- function call info size is too variable for this test, so disable it
|
||||||
SET timescaledb.telemetry_level='no_functions';
|
SET timescaledb.telemetry_level='no_functions';
|
||||||
SELECT setseed(1);
|
SELECT setseed(1);
|
||||||
|
@ -9,6 +9,7 @@ SELECT format('include/%s_load.sql', :'TEST_BASE_NAME') AS "TEST_LOAD_NAME",
|
|||||||
SELECT format('\! diff %s %s', :'TEST_RESULTS_UNCOMPRESSED', :'TEST_RESULTS_COMPRESSED') AS "DIFF_CMD" \gset
|
SELECT format('\! diff %s %s', :'TEST_RESULTS_UNCOMPRESSED', :'TEST_RESULTS_COMPRESSED') AS "DIFF_CMD" \gset
|
||||||
SET work_mem TO '50MB';
|
SET work_mem TO '50MB';
|
||||||
SET enable_incremental_sort TO off;
|
SET enable_incremental_sort TO off;
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
-- disable memoize node to make EXPLAIN output comparable between PG14 and previous versions
|
-- disable memoize node to make EXPLAIN output comparable between PG14 and previous versions
|
||||||
SELECT CASE WHEN current_setting('server_version_num')::int/10000 >= 14 THEN set_config('enable_memoize','off',false) ELSE 'off' END AS enable_memoize;
|
SELECT CASE WHEN current_setting('server_version_num')::int/10000 >= 14 THEN set_config('enable_memoize','off',false) ELSE 'off' END AS enable_memoize;
|
||||||
enable_memoize
|
enable_memoize
|
||||||
@ -175,6 +176,7 @@ FROM _timescaledb_catalog.hypertable ht
|
|||||||
-- no standard way to create an index on a compressed table.
|
-- no standard way to create an index on a compressed table.
|
||||||
-- Once a standard way exists, modify this test to use that method.
|
-- Once a standard way exists, modify this test to use that method.
|
||||||
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
CREATE INDEX ON metrics_space (device_id, device_id_peer, v0, v1 DESC, time);
|
CREATE INDEX ON metrics_space (device_id, device_id_peer, v0, v1 DESC, time);
|
||||||
CREATE INDEX ON metrics_space (device_id, device_id_peer DESC, v0, v1 DESC, time);
|
CREATE INDEX ON metrics_space (device_id, device_id_peer DESC, v0, v1 DESC, time);
|
||||||
CREATE INDEX ON metrics_space (device_id DESC, device_id_peer DESC, v0, v1 DESC, time);
|
CREATE INDEX ON metrics_space (device_id DESC, device_id_peer DESC, v0, v1 DESC, time);
|
||||||
|
@ -9,6 +9,7 @@ SELECT format('include/%s_load.sql', :'TEST_BASE_NAME') AS "TEST_LOAD_NAME",
|
|||||||
SELECT format('\! diff %s %s', :'TEST_RESULTS_UNCOMPRESSED', :'TEST_RESULTS_COMPRESSED') AS "DIFF_CMD" \gset
|
SELECT format('\! diff %s %s', :'TEST_RESULTS_UNCOMPRESSED', :'TEST_RESULTS_COMPRESSED') AS "DIFF_CMD" \gset
|
||||||
SET work_mem TO '50MB';
|
SET work_mem TO '50MB';
|
||||||
SET enable_incremental_sort TO off;
|
SET enable_incremental_sort TO off;
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
-- disable memoize node to make EXPLAIN output comparable between PG14 and previous versions
|
-- disable memoize node to make EXPLAIN output comparable between PG14 and previous versions
|
||||||
SELECT CASE WHEN current_setting('server_version_num')::int/10000 >= 14 THEN set_config('enable_memoize','off',false) ELSE 'off' END AS enable_memoize;
|
SELECT CASE WHEN current_setting('server_version_num')::int/10000 >= 14 THEN set_config('enable_memoize','off',false) ELSE 'off' END AS enable_memoize;
|
||||||
enable_memoize
|
enable_memoize
|
||||||
@ -175,6 +176,7 @@ FROM _timescaledb_catalog.hypertable ht
|
|||||||
-- no standard way to create an index on a compressed table.
|
-- no standard way to create an index on a compressed table.
|
||||||
-- Once a standard way exists, modify this test to use that method.
|
-- Once a standard way exists, modify this test to use that method.
|
||||||
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
CREATE INDEX ON metrics_space (device_id, device_id_peer, v0, v1 DESC, time);
|
CREATE INDEX ON metrics_space (device_id, device_id_peer, v0, v1 DESC, time);
|
||||||
CREATE INDEX ON metrics_space (device_id, device_id_peer DESC, v0, v1 DESC, time);
|
CREATE INDEX ON metrics_space (device_id, device_id_peer DESC, v0, v1 DESC, time);
|
||||||
CREATE INDEX ON metrics_space (device_id DESC, device_id_peer DESC, v0, v1 DESC, time);
|
CREATE INDEX ON metrics_space (device_id DESC, device_id_peer DESC, v0, v1 DESC, time);
|
||||||
|
@ -9,6 +9,7 @@ SELECT format('include/%s_load.sql', :'TEST_BASE_NAME') AS "TEST_LOAD_NAME",
|
|||||||
SELECT format('\! diff %s %s', :'TEST_RESULTS_UNCOMPRESSED', :'TEST_RESULTS_COMPRESSED') AS "DIFF_CMD" \gset
|
SELECT format('\! diff %s %s', :'TEST_RESULTS_UNCOMPRESSED', :'TEST_RESULTS_COMPRESSED') AS "DIFF_CMD" \gset
|
||||||
SET work_mem TO '50MB';
|
SET work_mem TO '50MB';
|
||||||
SET enable_incremental_sort TO off;
|
SET enable_incremental_sort TO off;
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
-- disable memoize node to make EXPLAIN output comparable between PG14 and previous versions
|
-- disable memoize node to make EXPLAIN output comparable between PG14 and previous versions
|
||||||
SELECT CASE WHEN current_setting('server_version_num')::int/10000 >= 14 THEN set_config('enable_memoize','off',false) ELSE 'off' END AS enable_memoize;
|
SELECT CASE WHEN current_setting('server_version_num')::int/10000 >= 14 THEN set_config('enable_memoize','off',false) ELSE 'off' END AS enable_memoize;
|
||||||
enable_memoize
|
enable_memoize
|
||||||
@ -175,6 +176,7 @@ FROM _timescaledb_catalog.hypertable ht
|
|||||||
-- no standard way to create an index on a compressed table.
|
-- no standard way to create an index on a compressed table.
|
||||||
-- Once a standard way exists, modify this test to use that method.
|
-- Once a standard way exists, modify this test to use that method.
|
||||||
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
CREATE INDEX ON metrics_space (device_id, device_id_peer, v0, v1 DESC, time);
|
CREATE INDEX ON metrics_space (device_id, device_id_peer, v0, v1 DESC, time);
|
||||||
CREATE INDEX ON metrics_space (device_id, device_id_peer DESC, v0, v1 DESC, time);
|
CREATE INDEX ON metrics_space (device_id, device_id_peer DESC, v0, v1 DESC, time);
|
||||||
CREATE INDEX ON metrics_space (device_id DESC, device_id_peer DESC, v0, v1 DESC, time);
|
CREATE INDEX ON metrics_space (device_id DESC, device_id_peer DESC, v0, v1 DESC, time);
|
||||||
|
@ -9,6 +9,7 @@ SELECT format('include/%s_load.sql', :'TEST_BASE_NAME') AS "TEST_LOAD_NAME",
|
|||||||
SELECT format('\! diff %s %s', :'TEST_RESULTS_UNCOMPRESSED', :'TEST_RESULTS_COMPRESSED') AS "DIFF_CMD" \gset
|
SELECT format('\! diff %s %s', :'TEST_RESULTS_UNCOMPRESSED', :'TEST_RESULTS_COMPRESSED') AS "DIFF_CMD" \gset
|
||||||
SET work_mem TO '50MB';
|
SET work_mem TO '50MB';
|
||||||
SET enable_incremental_sort TO off;
|
SET enable_incremental_sort TO off;
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
-- disable memoize node to make EXPLAIN output comparable between PG14 and previous versions
|
-- disable memoize node to make EXPLAIN output comparable between PG14 and previous versions
|
||||||
SELECT CASE WHEN current_setting('server_version_num')::int/10000 >= 14 THEN set_config('enable_memoize','off',false) ELSE 'off' END AS enable_memoize;
|
SELECT CASE WHEN current_setting('server_version_num')::int/10000 >= 14 THEN set_config('enable_memoize','off',false) ELSE 'off' END AS enable_memoize;
|
||||||
enable_memoize
|
enable_memoize
|
||||||
@ -175,6 +176,7 @@ FROM _timescaledb_catalog.hypertable ht
|
|||||||
-- no standard way to create an index on a compressed table.
|
-- no standard way to create an index on a compressed table.
|
||||||
-- Once a standard way exists, modify this test to use that method.
|
-- Once a standard way exists, modify this test to use that method.
|
||||||
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
CREATE INDEX ON metrics_space (device_id, device_id_peer, v0, v1 DESC, time);
|
CREATE INDEX ON metrics_space (device_id, device_id_peer, v0, v1 DESC, time);
|
||||||
CREATE INDEX ON metrics_space (device_id, device_id_peer DESC, v0, v1 DESC, time);
|
CREATE INDEX ON metrics_space (device_id, device_id_peer DESC, v0, v1 DESC, time);
|
||||||
CREATE INDEX ON metrics_space (device_id DESC, device_id_peer DESC, v0, v1 DESC, time);
|
CREATE INDEX ON metrics_space (device_id DESC, device_id_peer DESC, v0, v1 DESC, time);
|
||||||
|
@ -10,6 +10,8 @@
|
|||||||
#
|
#
|
||||||
setup
|
setup
|
||||||
{
|
{
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
CREATE TABLE temperature (
|
CREATE TABLE temperature (
|
||||||
time timestamptz NOT NULL,
|
time timestamptz NOT NULL,
|
||||||
value float
|
value float
|
||||||
|
@ -10,6 +10,8 @@
|
|||||||
#
|
#
|
||||||
setup
|
setup
|
||||||
{
|
{
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
CREATE TABLE temperature (
|
CREATE TABLE temperature (
|
||||||
time timestamptz NOT NULL,
|
time timestamptz NOT NULL,
|
||||||
value float
|
value float
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
-- This file and its contents are licensed under the Timescale License.
|
-- This file and its contents are licensed under the Timescale License.
|
||||||
-- Please see the included NOTICE for copyright information and
|
-- Please see the included NOTICE for copyright information and
|
||||||
-- LICENSE-TIMESCALE for a copy of the license.
|
-- LICENSE-TIMESCALE for a copy of the license.
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
SELECT
|
SELECT
|
||||||
format('include/%s_setup.sql', :'TEST_BASE_NAME') as "TEST_SETUP_NAME",
|
format('include/%s_setup.sql', :'TEST_BASE_NAME') as "TEST_SETUP_NAME",
|
||||||
format('include/%s_query.sql', :'TEST_BASE_NAME') as "TEST_QUERY_NAME",
|
format('include/%s_query.sql', :'TEST_BASE_NAME') as "TEST_QUERY_NAME",
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
-- This file and its contents are licensed under the Timescale License.
|
-- This file and its contents are licensed under the Timescale License.
|
||||||
-- Please see the included NOTICE for copyright information and
|
-- Please see the included NOTICE for copyright information and
|
||||||
-- LICENSE-TIMESCALE for a copy of the license.
|
-- LICENSE-TIMESCALE for a copy of the license.
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
\set ON_ERROR_STOP 0
|
\set ON_ERROR_STOP 0
|
||||||
SELECT _timescaledb_internal.alter_job_set_hypertable_id(0,0);
|
SELECT _timescaledb_internal.alter_job_set_hypertable_id(0,0);
|
||||||
WARNING: function _timescaledb_internal.alter_job_set_hypertable_id(integer,regclass) is deprecated and has been moved to _timescaledb_functions schema. this compatibility function will be removed in a future version.
|
WARNING: function _timescaledb_internal.alter_job_set_hypertable_id(integer,regclass) is deprecated and has been moved to _timescaledb_functions schema. this compatibility function will be removed in a future version.
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
SET timescaledb.enable_chunk_append TO false;
|
SET timescaledb.enable_chunk_append TO false;
|
||||||
SET timescaledb.enable_constraint_aware_append TO false;
|
SET timescaledb.enable_constraint_aware_append TO false;
|
||||||
SET timescaledb.current_timestamp_mock TO '1990-01-01';
|
SET timescaledb.current_timestamp_mock TO '1990-01-01';
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
\set PREFIX 'EXPLAIN (COSTS OFF, SUMMARY OFF, TIMING OFF)'
|
\set PREFIX 'EXPLAIN (COSTS OFF, SUMMARY OFF, TIMING OFF)'
|
||||||
-- create a test table
|
-- create a test table
|
||||||
-- any query with successful now_constify will have 1 chunk while
|
-- any query with successful now_constify will have 1 chunk while
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
-- Please see the included NOTICE for copyright information and
|
-- Please see the included NOTICE for copyright information and
|
||||||
-- LICENSE-TIMESCALE for a copy of the license.
|
-- LICENSE-TIMESCALE for a copy of the license.
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
format('include/%s_setup.sql', :'TEST_BASE_NAME') as "TEST_SETUP_NAME",
|
format('include/%s_setup.sql', :'TEST_BASE_NAME') as "TEST_SETUP_NAME",
|
||||||
format('include/%s_query.sql', :'TEST_BASE_NAME') as "TEST_QUERY_NAME",
|
format('include/%s_query.sql', :'TEST_BASE_NAME') as "TEST_QUERY_NAME",
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
-- Please see the included NOTICE for copyright information and
|
-- Please see the included NOTICE for copyright information and
|
||||||
-- LICENSE-TIMESCALE for a copy of the license.
|
-- LICENSE-TIMESCALE for a copy of the license.
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
\set ON_ERROR_STOP 0
|
\set ON_ERROR_STOP 0
|
||||||
|
|
||||||
SELECT _timescaledb_internal.alter_job_set_hypertable_id(0,0);
|
SELECT _timescaledb_internal.alter_job_set_hypertable_id(0,0);
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
SET timescaledb.enable_chunk_append TO false;
|
SET timescaledb.enable_chunk_append TO false;
|
||||||
SET timescaledb.enable_constraint_aware_append TO false;
|
SET timescaledb.enable_constraint_aware_append TO false;
|
||||||
SET timescaledb.current_timestamp_mock TO '1990-01-01';
|
SET timescaledb.current_timestamp_mock TO '1990-01-01';
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
\set PREFIX 'EXPLAIN (COSTS OFF, SUMMARY OFF, TIMING OFF)'
|
\set PREFIX 'EXPLAIN (COSTS OFF, SUMMARY OFF, TIMING OFF)'
|
||||||
|
|
||||||
|
@ -6,6 +6,9 @@
|
|||||||
-- Setup
|
-- Setup
|
||||||
--
|
--
|
||||||
\c :TEST_DBNAME :ROLE_SUPERUSER
|
\c :TEST_DBNAME :ROLE_SUPERUSER
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
-- this mock_start_time doesnt seem to be used anywhere
|
-- this mock_start_time doesnt seem to be used anywhere
|
||||||
CREATE OR REPLACE FUNCTION ts_bgw_db_scheduler_test_run_and_wait_for_scheduler_finish(timeout INT = -1, mock_start_time INT = 0) RETURNS VOID
|
CREATE OR REPLACE FUNCTION ts_bgw_db_scheduler_test_run_and_wait_for_scheduler_finish(timeout INT = -1, mock_start_time INT = 0) RETURNS VOID
|
||||||
AS :MODULE_PATHNAME LANGUAGE C VOLATILE;
|
AS :MODULE_PATHNAME LANGUAGE C VOLATILE;
|
||||||
@ -108,6 +111,8 @@ TRUNCATE _timescaledb_internal.bgw_job_stat;
|
|||||||
|
|
||||||
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
CREATE TABLE public.bgw_log(
|
CREATE TABLE public.bgw_log(
|
||||||
msg_no INT,
|
msg_no INT,
|
||||||
mock_time BIGINT,
|
mock_time BIGINT,
|
||||||
@ -197,6 +202,8 @@ SELECT insert_job('test_job_1', 'bgw_test_job_1', INTERVAL '100ms', INTERVAL '10
|
|||||||
select * from _timescaledb_config.bgw_job;
|
select * from _timescaledb_config.bgw_job;
|
||||||
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
--Tests that the scheduler start a job right away if it's the first time and there is no job_stat entry for it
|
--Tests that the scheduler start a job right away if it's the first time and there is no job_stat entry for it
|
||||||
SELECT ts_bgw_db_scheduler_test_run_and_wait_for_scheduler_finish(25);
|
SELECT ts_bgw_db_scheduler_test_run_and_wait_for_scheduler_finish(25);
|
||||||
SELECT job_id, next_start, last_finish as until_next, last_run_success, total_runs, total_successes, total_failures, total_crashes
|
SELECT job_id, next_start, last_finish as until_next, last_run_success, total_runs, total_successes, total_failures, total_crashes
|
||||||
@ -234,6 +241,8 @@ DELETE FROM _timescaledb_config.bgw_job;
|
|||||||
SELECT insert_job('test_job_2', 'bgw_test_job_2_error', INTERVAL '800ms', INTERVAL '100s', INTERVAL '200ms');
|
SELECT insert_job('test_job_2', 'bgw_test_job_2_error', INTERVAL '800ms', INTERVAL '100s', INTERVAL '200ms');
|
||||||
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
--Run the first time and error
|
--Run the first time and error
|
||||||
SELECT ts_bgw_db_scheduler_test_run_and_wait_for_scheduler_finish(25);
|
SELECT ts_bgw_db_scheduler_test_run_and_wait_for_scheduler_finish(25);
|
||||||
SELECT job_id, last_run_success, total_runs, total_successes, total_failures, total_crashes
|
SELECT job_id, last_run_success, total_runs, total_successes, total_failures, total_crashes
|
||||||
@ -539,6 +548,8 @@ SELECT _timescaledb_functions.start_background_workers();
|
|||||||
\c :TEST_DBNAME :ROLE_SUPERUSER
|
\c :TEST_DBNAME :ROLE_SUPERUSER
|
||||||
SELECT _timescaledb_functions.stop_background_workers();
|
SELECT _timescaledb_functions.stop_background_workers();
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION ts_test_job_refresh() RETURNS TABLE(
|
CREATE OR REPLACE FUNCTION ts_test_job_refresh() RETURNS TABLE(
|
||||||
id INTEGER,
|
id INTEGER,
|
||||||
application_name NAME,
|
application_name NAME,
|
||||||
|
@ -24,6 +24,9 @@ SELECT table_name FROM create_hypertable('conditions', 'timec');
|
|||||||
-- schema tests
|
-- schema tests
|
||||||
|
|
||||||
\c :TEST_DBNAME :ROLE_CLUSTER_SUPERUSER
|
\c :TEST_DBNAME :ROLE_CLUSTER_SUPERUSER
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
-- drop if the tablespace1 and/or tablespace2 exists
|
-- drop if the tablespace1 and/or tablespace2 exists
|
||||||
SET client_min_messages TO error;
|
SET client_min_messages TO error;
|
||||||
DROP TABLESPACE IF EXISTS tablespace1;
|
DROP TABLESPACE IF EXISTS tablespace1;
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
\c :TEST_DBNAME :ROLE_SUPERUSER
|
\c :TEST_DBNAME :ROLE_SUPERUSER
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Check that drop chunks with a unique constraint works as expected.
|
-- Check that drop chunks with a unique constraint works as expected.
|
||||||
--
|
--
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
-- Please see the included NOTICE for copyright information and
|
-- Please see the included NOTICE for copyright information and
|
||||||
-- LICENSE-TIMESCALE for a copy of the license.
|
-- LICENSE-TIMESCALE for a copy of the license.
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
CREATE TYPE custom_type AS (high int, low int);
|
CREATE TYPE custom_type AS (high int, low int);
|
||||||
|
|
||||||
CREATE TABLE conditions_before (
|
CREATE TABLE conditions_before (
|
||||||
@ -118,6 +120,7 @@ SELECT count(*) FROM conditions_after;
|
|||||||
|
|
||||||
--dump & restore
|
--dump & restore
|
||||||
\c postgres :ROLE_SUPERUSER
|
\c postgres :ROLE_SUPERUSER
|
||||||
|
|
||||||
\! utils/pg_dump_aux_dump.sh dump/pg_dump.sql
|
\! utils/pg_dump_aux_dump.sh dump/pg_dump.sql
|
||||||
|
|
||||||
\c :TEST_DBNAME
|
\c :TEST_DBNAME
|
||||||
@ -133,6 +136,8 @@ SELECT _timescaledb_functions.stop_background_workers();
|
|||||||
|
|
||||||
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
--make sure the appropriate DROP are still blocked.
|
--make sure the appropriate DROP are still blocked.
|
||||||
\set ON_ERROR_STOP 0
|
\set ON_ERROR_STOP 0
|
||||||
DROP table :"MAT_SCHEMA_NAME".:"MAT_TABLE_NAME";
|
DROP table :"MAT_SCHEMA_NAME".:"MAT_TABLE_NAME";
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
\set ON_ERROR_STOP 0
|
\set ON_ERROR_STOP 0
|
||||||
\set VERBOSITY default
|
\set VERBOSITY default
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
--negative tests for query validation
|
--negative tests for query validation
|
||||||
create table mat_t1( a integer, b integer,c TEXT);
|
create table mat_t1( a integer, b integer,c TEXT);
|
||||||
|
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
\set VERBOSITY default
|
\set VERBOSITY default
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
CREATE TABLE conditions(
|
CREATE TABLE conditions(
|
||||||
day TIMESTAMPTZ NOT NULL,
|
day TIMESTAMPTZ NOT NULL,
|
||||||
city text NOT NULL,
|
city text NOT NULL,
|
||||||
@ -576,6 +578,7 @@ SELECT * FROM conditions_by_day ORDER BY bucket, device, location;
|
|||||||
|
|
||||||
-- JOIN with a foreign table
|
-- JOIN with a foreign table
|
||||||
\c :TEST_DBNAME :ROLE_SUPERUSER
|
\c :TEST_DBNAME :ROLE_SUPERUSER
|
||||||
|
|
||||||
SELECT current_setting('port') AS "PGPORT", current_database() AS "PGDATABASE" \gset
|
SELECT current_setting('port') AS "PGPORT", current_database() AS "PGDATABASE" \gset
|
||||||
CREATE EXTENSION postgres_fdw;
|
CREATE EXTENSION postgres_fdw;
|
||||||
CREATE SERVER loopback
|
CREATE SERVER loopback
|
||||||
@ -590,6 +593,8 @@ ALTER USER MAPPING FOR :ROLE_DEFAULT_PERM_USER
|
|||||||
GRANT USAGE ON FOREIGN SERVER loopback TO :ROLE_DEFAULT_PERM_USER;
|
GRANT USAGE ON FOREIGN SERVER loopback TO :ROLE_DEFAULT_PERM_USER;
|
||||||
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER;
|
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER;
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
CREATE FOREIGN TABLE devices_fdw (
|
CREATE FOREIGN TABLE devices_fdw (
|
||||||
device_id int not null,
|
device_id int not null,
|
||||||
name text,
|
name text,
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
SET ROLE :ROLE_DEFAULT_PERM_USER;
|
SET ROLE :ROLE_DEFAULT_PERM_USER;
|
||||||
|
|
||||||
|
|
||||||
--TEST1 ---
|
--TEST1 ---
|
||||||
--basic test with count
|
--basic test with count
|
||||||
CREATE TABLE int_tab (a integer, b integer, c integer);
|
CREATE TABLE int_tab (a integer, b integer, c integer);
|
||||||
@ -33,6 +32,9 @@ FROM int_tab
|
|||||||
GROUP BY time_bucket(1, a), a WITH NO DATA;
|
GROUP BY time_bucket(1, a), a WITH NO DATA;
|
||||||
|
|
||||||
\c :TEST_DBNAME :ROLE_SUPERUSER
|
\c :TEST_DBNAME :ROLE_SUPERUSER
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
DELETE FROM _timescaledb_config.bgw_job WHERE TRUE;
|
DELETE FROM _timescaledb_config.bgw_job WHERE TRUE;
|
||||||
|
|
||||||
SET ROLE :ROLE_DEFAULT_PERM_USER;
|
SET ROLE :ROLE_DEFAULT_PERM_USER;
|
||||||
@ -129,6 +131,9 @@ SELECT hypertable_id as mat_id FROM _timescaledb_config.bgw_job where id = :job_
|
|||||||
\set ON_ERROR_STOP 1
|
\set ON_ERROR_STOP 1
|
||||||
|
|
||||||
\c :TEST_DBNAME :ROLE_SUPERUSER
|
\c :TEST_DBNAME :ROLE_SUPERUSER
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
UPDATE _timescaledb_config.bgw_job
|
UPDATE _timescaledb_config.bgw_job
|
||||||
SET config = jsonb_build_object('mat_hypertable_id', :mat_id)
|
SET config = jsonb_build_object('mat_hypertable_id', :mat_id)
|
||||||
WHERE id = :job_id;
|
WHERE id = :job_id;
|
||||||
@ -340,6 +345,9 @@ SELECT config FROM _timescaledb_config.bgw_job
|
|||||||
WHERE id = :job_id;
|
WHERE id = :job_id;
|
||||||
|
|
||||||
\c :TEST_DBNAME :ROLE_SUPERUSER
|
\c :TEST_DBNAME :ROLE_SUPERUSER
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
UPDATE _timescaledb_config.bgw_job
|
UPDATE _timescaledb_config.bgw_job
|
||||||
SET config = jsonb_build_object('mat_hypertable_id', :mat_id)
|
SET config = jsonb_build_object('mat_hypertable_id', :mat_id)
|
||||||
WHERE id = :job_id;
|
WHERE id = :job_id;
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
-- Connect as superuser to use SET ROLE later
|
-- Connect as superuser to use SET ROLE later
|
||||||
\c :TEST_DBNAME :ROLE_CLUSTER_SUPERUSER
|
\c :TEST_DBNAME :ROLE_CLUSTER_SUPERUSER
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
-- Run tests with default role
|
-- Run tests with default role
|
||||||
SET ROLE :ROLE_DEFAULT_PERM_USER;
|
SET ROLE :ROLE_DEFAULT_PERM_USER;
|
||||||
|
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
-- Connect as superuser to use SET ROLE later
|
-- Connect as superuser to use SET ROLE later
|
||||||
\c :TEST_DBNAME :ROLE_CLUSTER_SUPERUSER
|
\c :TEST_DBNAME :ROLE_CLUSTER_SUPERUSER
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
-- Run tests with default role
|
-- Run tests with default role
|
||||||
SET ROLE :ROLE_DEFAULT_PERM_USER;
|
SET ROLE :ROLE_DEFAULT_PERM_USER;
|
||||||
|
|
||||||
|
@ -2,4 +2,6 @@
|
|||||||
-- Please see the included NOTICE for copyright information and
|
-- Please see the included NOTICE for copyright information and
|
||||||
-- LICENSE-TIMESCALE for a copy of the license.
|
-- LICENSE-TIMESCALE for a copy of the license.
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
\ir include/cagg_refresh_common.sql
|
\ir include/cagg_refresh_common.sql
|
||||||
|
@ -4,5 +4,6 @@
|
|||||||
|
|
||||||
-- Enable MERGE statements for continuous aggregate refresh
|
-- Enable MERGE statements for continuous aggregate refresh
|
||||||
SET timescaledb.enable_merge_on_cagg_refresh TO ON;
|
SET timescaledb.enable_merge_on_cagg_refresh TO ON;
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
\ir include/cagg_refresh_common.sql
|
\ir include/cagg_refresh_common.sql
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
\c :TEST_DBNAME :ROLE_SUPERUSER
|
\c :TEST_DBNAME :ROLE_SUPERUSER
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
CREATE PROCEDURE _timescaledb_internal.cagg_try_repair (
|
CREATE PROCEDURE _timescaledb_internal.cagg_try_repair (
|
||||||
cagg_view REGCLASS,
|
cagg_view REGCLASS,
|
||||||
force_rebuild BOOLEAN
|
force_rebuild BOOLEAN
|
||||||
|
@ -7,6 +7,8 @@
|
|||||||
SELECT _timescaledb_functions.stop_background_workers();
|
SELECT _timescaledb_functions.stop_background_workers();
|
||||||
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
\set PREFIX 'EXPLAIN (analyze, costs off, timing off, summary off)'
|
\set PREFIX 'EXPLAIN (analyze, costs off, timing off, summary off)'
|
||||||
|
|
||||||
CREATE TABLE metrics(f1 int, f2 int, time timestamptz NOT NULL, device_id int, value float);
|
CREATE TABLE metrics(f1 int, f2 int, time timestamptz NOT NULL, device_id int, value float);
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
\set ON_ERROR_STOP 0
|
\set ON_ERROR_STOP 0
|
||||||
SET client_min_messages TO NOTICE;
|
SET client_min_messages TO NOTICE;
|
||||||
SET work_mem TO '64MB';
|
SET work_mem TO '64MB';
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
-- START OF USAGE TEST --
|
-- START OF USAGE TEST --
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
-- LICENSE-TIMESCALE for a copy of the license.
|
-- LICENSE-TIMESCALE for a copy of the license.
|
||||||
|
|
||||||
SET search_path TO public, _timescaledb_functions;
|
SET search_path TO public, _timescaledb_functions;
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
CREATE TABLE devices (
|
CREATE TABLE devices (
|
||||||
id INTEGER,
|
id INTEGER,
|
||||||
@ -113,6 +114,8 @@ CREATE OR REPLACE FUNCTION cagg_get_bucket_function(
|
|||||||
) RETURNS regprocedure AS :MODULE_PATHNAME, 'ts_continuous_agg_get_bucket_function' LANGUAGE C STRICT VOLATILE;
|
) RETURNS regprocedure AS :MODULE_PATHNAME, 'ts_continuous_agg_get_bucket_function' LANGUAGE C STRICT VOLATILE;
|
||||||
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
CREATE TABLE timestamp_ht (
|
CREATE TABLE timestamp_ht (
|
||||||
time timestamp NOT NULL,
|
time timestamp NOT NULL,
|
||||||
value float
|
value float
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
-- Please see the included NOTICE for copyright information and
|
-- Please see the included NOTICE for copyright information and
|
||||||
-- LICENSE-TIMESCALE for a copy of the license.
|
-- LICENSE-TIMESCALE for a copy of the license.
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
\set EXPLAIN_ANALYZE 'EXPLAIN (analyze,costs off,timing off,summary off)'
|
\set EXPLAIN_ANALYZE 'EXPLAIN (analyze,costs off,timing off,summary off)'
|
||||||
|
|
||||||
CREATE TABLE continuous_agg_test(time int, data int);
|
CREATE TABLE continuous_agg_test(time int, data int);
|
||||||
@ -44,6 +46,8 @@ SELECT * from _timescaledb_catalog.continuous_aggs_hypertable_invalidation_log;
|
|||||||
INSERT INTO _timescaledb_catalog.continuous_aggs_invalidation_threshold VALUES (1, 15);
|
INSERT INTO _timescaledb_catalog.continuous_aggs_invalidation_threshold VALUES (1, 15);
|
||||||
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
INSERT INTO continuous_agg_test VALUES (10, 1), (11, 2), (21, 3), (22, 4);
|
INSERT INTO continuous_agg_test VALUES (10, 1), (11, 2), (21, 3), (22, 4);
|
||||||
|
|
||||||
SELECT * FROM _timescaledb_catalog.continuous_aggs_invalidation_threshold;
|
SELECT * FROM _timescaledb_catalog.continuous_aggs_invalidation_threshold;
|
||||||
@ -183,6 +187,8 @@ SET watermark = 2
|
|||||||
WHERE hypertable_id = 5;
|
WHERE hypertable_id = 5;
|
||||||
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
INSERT INTO ts_continuous_test VALUES (1, 1);
|
INSERT INTO ts_continuous_test VALUES (1, 1);
|
||||||
|
|
||||||
SELECT * FROM _timescaledb_catalog.continuous_aggs_invalidation_threshold;
|
SELECT * FROM _timescaledb_catalog.continuous_aggs_invalidation_threshold;
|
||||||
|
@ -8,6 +8,8 @@ CREATE OR REPLACE FUNCTION _timescaledb_internal.test_merge_chunks_on_dimension(
|
|||||||
AS :TSL_MODULE_PATHNAME, 'ts_test_merge_chunks_on_dimension' LANGUAGE C VOLATILE;
|
AS :TSL_MODULE_PATHNAME, 'ts_test_merge_chunks_on_dimension' LANGUAGE C VOLATILE;
|
||||||
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
CREATE TABLE test1 ("Time" timestamptz, i integer, value integer);
|
CREATE TABLE test1 ("Time" timestamptz, i integer, value integer);
|
||||||
SELECT table_name FROM Create_hypertable('test1', 'Time', chunk_time_interval=> INTERVAL '1 hour');
|
SELECT table_name FROM Create_hypertable('test1', 'Time', chunk_time_interval=> INTERVAL '1 hour');
|
||||||
SELECT table_name FROM add_dimension('test1', 'i', number_partitions=> 2);
|
SELECT table_name FROM add_dimension('test1', 'i', number_partitions=> 2);
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
-- LICENSE-TIMESCALE for a copy of the license.
|
-- LICENSE-TIMESCALE for a copy of the license.
|
||||||
|
|
||||||
SET timescaledb.enable_transparent_decompression to OFF;
|
SET timescaledb.enable_transparent_decompression to OFF;
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
\set PREFIX 'EXPLAIN (analyze, verbose, costs off, timing off, summary off)'
|
\set PREFIX 'EXPLAIN (analyze, verbose, costs off, timing off, summary off)'
|
||||||
|
|
||||||
@ -630,6 +631,8 @@ SET reltuples = 0, relpages = 0
|
|||||||
AND ch.compressed_chunk_id > 0 );
|
AND ch.compressed_chunk_id > 0 );
|
||||||
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
-- reltuples is initially -1 on PG14 before VACUUM/ANALYZE has been run
|
-- reltuples is initially -1 on PG14 before VACUUM/ANALYZE has been run
|
||||||
SELECT relname, CASE WHEN reltuples > 0 THEN reltuples ELSE 0 END AS reltuples, relpages, relallvisible FROM pg_class
|
SELECT relname, CASE WHEN reltuples > 0 THEN reltuples ELSE 0 END AS reltuples, relpages, relallvisible FROM pg_class
|
||||||
WHERE relname in ( SELECT ch.table_name FROM
|
WHERE relname in ( SELECT ch.table_name FROM
|
||||||
|
@ -11,6 +11,8 @@ GRANT NOLOGIN_ROLE TO :ROLE_DEFAULT_PERM_USER WITH ADMIN OPTION;
|
|||||||
|
|
||||||
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
CREATE TABLE conditions (
|
CREATE TABLE conditions (
|
||||||
time TIMESTAMPTZ NOT NULL,
|
time TIMESTAMPTZ NOT NULL,
|
||||||
location TEXT NOT NULL,
|
location TEXT NOT NULL,
|
||||||
@ -164,6 +166,8 @@ RESET ROLE;
|
|||||||
|
|
||||||
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
CREATE TABLE conditions(
|
CREATE TABLE conditions(
|
||||||
time TIMESTAMPTZ NOT NULL,
|
time TIMESTAMPTZ NOT NULL,
|
||||||
device INTEGER,
|
device INTEGER,
|
||||||
|
@ -15,6 +15,8 @@ CREATE TABLESPACE tablespace2 OWNER :ROLE_DEFAULT_PERM_USER LOCATION :TEST_TABLE
|
|||||||
|
|
||||||
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
CREATE TABLE test1 ("Time" timestamptz, i integer, b bigint, t text);
|
CREATE TABLE test1 ("Time" timestamptz, i integer, b bigint, t text);
|
||||||
SELECT table_name from create_hypertable('test1', 'Time', chunk_time_interval=> INTERVAL '1 day');
|
SELECT table_name from create_hypertable('test1', 'Time', chunk_time_interval=> INTERVAL '1 day');
|
||||||
|
|
||||||
@ -356,6 +358,8 @@ SELECT count(*) FROM test1_cont_view;
|
|||||||
|
|
||||||
\c :TEST_DBNAME :ROLE_SUPERUSER
|
\c :TEST_DBNAME :ROLE_SUPERUSER
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
SELECT chunk.schema_name|| '.' || chunk.table_name as "COMPRESSED_CHUNK_NAME"
|
SELECT chunk.schema_name|| '.' || chunk.table_name as "COMPRESSED_CHUNK_NAME"
|
||||||
FROM _timescaledb_catalog.chunk chunk
|
FROM _timescaledb_catalog.chunk chunk
|
||||||
INNER JOIN _timescaledb_catalog.hypertable comp_hyper ON (chunk.hypertable_id = comp_hyper.id)
|
INNER JOIN _timescaledb_catalog.hypertable comp_hyper ON (chunk.hypertable_id = comp_hyper.id)
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
-- Please see the included NOTICE for copyright information and
|
-- Please see the included NOTICE for copyright information and
|
||||||
-- LICENSE-TIMESCALE for a copy of the license.
|
-- LICENSE-TIMESCALE for a copy of the license.
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
\set PREFIX 'EXPLAIN (costs off, summary off, timing off) '
|
\set PREFIX 'EXPLAIN (costs off, summary off, timing off) '
|
||||||
\set ANALYZE 'EXPLAIN (analyze, costs off, summary off, timing off) '
|
\set ANALYZE 'EXPLAIN (analyze, costs off, summary off, timing off) '
|
||||||
CREATE TABLE test1 (timec timestamptz , i integer ,
|
CREATE TABLE test1 (timec timestamptz , i integer ,
|
||||||
|
@ -606,6 +606,8 @@ WHERE user_view_name = 'mat_drop_test'
|
|||||||
\gset
|
\gset
|
||||||
|
|
||||||
SET client_min_messages TO NOTICE;
|
SET client_min_messages TO NOTICE;
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
CALL refresh_continuous_aggregate('mat_drop_test', NULL, NULL);
|
CALL refresh_continuous_aggregate('mat_drop_test', NULL, NULL);
|
||||||
|
|
||||||
--force invalidation
|
--force invalidation
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
\c :TEST_DBNAME :ROLE_SUPERUSER
|
\c :TEST_DBNAME :ROLE_SUPERUSER
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
-- hypertable creation
|
-- hypertable creation
|
||||||
SHOW timescaledb.enable_hypertable_create;
|
SHOW timescaledb.enable_hypertable_create;
|
||||||
SET timescaledb.enable_hypertable_create TO off;
|
SET timescaledb.enable_hypertable_create TO off;
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
-- Please see the included NOTICE for copyright information and
|
-- Please see the included NOTICE for copyright information and
|
||||||
-- LICENSE-TIMESCALE for a copy of the license.
|
-- LICENSE-TIMESCALE for a copy of the license.
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
CREATE TABLE sensor_data(
|
CREATE TABLE sensor_data(
|
||||||
time timestamptz not null,
|
time timestamptz not null,
|
||||||
sensor_id integer not null,
|
sensor_id integer not null,
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
-- Please see the included NOTICE for copyright information and
|
-- Please see the included NOTICE for copyright information and
|
||||||
-- LICENSE-TIMESCALE for a copy of the license.
|
-- LICENSE-TIMESCALE for a copy of the license.
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
\set TEST_BASE_NAME jit
|
\set TEST_BASE_NAME jit
|
||||||
SELECT format('include/%s_load.sql', :'TEST_BASE_NAME') as "TEST_LOAD_NAME",
|
SELECT format('include/%s_load.sql', :'TEST_BASE_NAME') as "TEST_LOAD_NAME",
|
||||||
format('include/%s_query.sql', :'TEST_BASE_NAME') as "TEST_QUERY_NAME",
|
format('include/%s_query.sql', :'TEST_BASE_NAME') as "TEST_QUERY_NAME",
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
-- Please see the included NOTICE for copyright information and
|
-- Please see the included NOTICE for copyright information and
|
||||||
-- LICENSE-TIMESCALE for a copy of the license.
|
-- LICENSE-TIMESCALE for a copy of the license.
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
-- Prepare test data for continuous aggregate size function tests
|
-- Prepare test data for continuous aggregate size function tests
|
||||||
CREATE TABLE hypersize(time timestamptz, device int);
|
CREATE TABLE hypersize(time timestamptz, device int);
|
||||||
SELECT * FROM create_hypertable('hypersize', 'time');
|
SELECT * FROM create_hypertable('hypersize', 'time');
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
--telemetry tests that require a community license
|
--telemetry tests that require a community license
|
||||||
\c :TEST_DBNAME :ROLE_CLUSTER_SUPERUSER;
|
\c :TEST_DBNAME :ROLE_CLUSTER_SUPERUSER;
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
-- function call info size is too variable for this test, so disable it
|
-- function call info size is too variable for this test, so disable it
|
||||||
SET timescaledb.telemetry_level='no_functions';
|
SET timescaledb.telemetry_level='no_functions';
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ SELECT format('\! diff %s %s', :'TEST_RESULTS_UNCOMPRESSED', :'TEST_RESULTS_COMP
|
|||||||
|
|
||||||
SET work_mem TO '50MB';
|
SET work_mem TO '50MB';
|
||||||
SET enable_incremental_sort TO off;
|
SET enable_incremental_sort TO off;
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
-- disable memoize node to make EXPLAIN output comparable between PG14 and previous versions
|
-- disable memoize node to make EXPLAIN output comparable between PG14 and previous versions
|
||||||
SELECT CASE WHEN current_setting('server_version_num')::int/10000 >= 14 THEN set_config('enable_memoize','off',false) ELSE 'off' END AS enable_memoize;
|
SELECT CASE WHEN current_setting('server_version_num')::int/10000 >= 14 THEN set_config('enable_memoize','off',false) ELSE 'off' END AS enable_memoize;
|
||||||
@ -189,6 +190,9 @@ FROM _timescaledb_catalog.hypertable ht
|
|||||||
-- Once a standard way exists, modify this test to use that method.
|
-- Once a standard way exists, modify this test to use that method.
|
||||||
|
|
||||||
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
|
||||||
|
|
||||||
|
SET timezone TO PST8PDT;
|
||||||
|
|
||||||
CREATE INDEX ON metrics_space (device_id, device_id_peer, v0, v1 DESC, time);
|
CREATE INDEX ON metrics_space (device_id, device_id_peer, v0, v1 DESC, time);
|
||||||
|
|
||||||
CREATE INDEX ON metrics_space (device_id, device_id_peer DESC, v0, v1 DESC, time);
|
CREATE INDEX ON metrics_space (device_id, device_id_peer DESC, v0, v1 DESC, time);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user