-
Notifications
You must be signed in to change notification settings - Fork 879
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## 2.10.2 (2023-04-20) **Bugfixes** * #5410 Fix file trailer handling in the COPY fetcher * #5446 Add checks for malloc failure in libpq calls * #5233 Out of on_proc_exit slots on guc license change * #5428 Use consistent snapshots when scanning metadata * #5499 Do not segfault on large histogram() parameters * #5470 Ensure superuser perms during copy/move chunk * #5500 Fix when no FROM clause in continuous aggregate definition * #5433 Fix join rte in CAggs with joins * #5556 Fix duplicated entries on timescaledb_experimental.policies view * #5462 Fix segfault after column drop on compressed table * #5543 Copy scheduled_jobs list before sorting it * #5497 Allow named time_bucket arguments in Cagg definition * #5544 Fix refresh from beginning of Continuous Aggregate with variable time bucket * #5558 Use regrole for job owner * #5542 Enable indexscan on uncompressed part of partially compressed chunks **Thanks** * @nikolaps for reporting an issue with the COPY fetcher * @S-imo-n for reporting the issue on Background Worker Scheduler crash * @geezhu for reporting issue on segfault in historgram() * @mwahlhuetter for reporting the issue with joins in CAggs * @mwahlhuetter for reporting issue with duplicated entries on timescaledb_experimental.policies view * @H25E for reporting error refreshing from beginning of a Continuous Aggregate with variable time bucket
- Loading branch information
Showing
7 changed files
with
166 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
DROP FUNCTION _timescaledb_internal.ping_data_node(NAME); | ||
|
||
CREATE OR REPLACE FUNCTION _timescaledb_internal.ping_data_node(node_name NAME, timeout INTERVAL = NULL) RETURNS BOOLEAN | ||
AS '@MODULE_PATHNAME@', 'ts_data_node_ping' LANGUAGE C VOLATILE; | ||
|
||
-- drop dependent views | ||
DROP VIEW IF EXISTS timescaledb_information.job_errors; | ||
DROP VIEW IF EXISTS timescaledb_information.job_stats; | ||
DROP VIEW IF EXISTS timescaledb_information.jobs; | ||
DROP VIEW IF EXISTS timescaledb_experimental.policies; | ||
|
||
ALTER TABLE _timescaledb_config.bgw_job | ||
ALTER COLUMN owner DROP DEFAULT, | ||
ALTER COLUMN owner TYPE regrole USING owner::regrole, | ||
ALTER COLUMN owner SET DEFAULT current_role::regrole; | ||
CREATE TABLE _timescaledb_config.bgw_job_tmp AS SELECT * FROM _timescaledb_config.bgw_job; | ||
|
||
ALTER EXTENSION timescaledb DROP TABLE _timescaledb_config.bgw_job; | ||
ALTER EXTENSION timescaledb DROP SEQUENCE _timescaledb_config.bgw_job_id_seq; | ||
ALTER TABLE _timescaledb_internal.bgw_job_stat | ||
DROP CONSTRAINT IF EXISTS bgw_job_stat_job_id_fkey; | ||
ALTER TABLE _timescaledb_internal.bgw_policy_chunk_stats | ||
DROP CONSTRAINT IF EXISTS bgw_policy_chunk_stats_job_id_fkey; | ||
CREATE TABLE _timescaledb_internal.tmp_bgw_job_seq_value AS | ||
SELECT last_value, is_called FROM _timescaledb_config.bgw_job_id_seq; | ||
DROP TABLE _timescaledb_config.bgw_job; | ||
|
||
CREATE SEQUENCE _timescaledb_config.bgw_job_id_seq MINVALUE 1000; | ||
SELECT pg_catalog.pg_extension_config_dump('_timescaledb_config.bgw_job_id_seq', ''); | ||
SELECT pg_catalog.setval('_timescaledb_config.bgw_job_id_seq', last_value, is_called) | ||
FROM _timescaledb_internal.tmp_bgw_job_seq_value; | ||
DROP TABLE _timescaledb_internal.tmp_bgw_job_seq_value; | ||
|
||
CREATE TABLE _timescaledb_config.bgw_job ( | ||
id integer NOT NULL DEFAULT nextval('_timescaledb_config.bgw_job_id_seq'), | ||
application_name name NOT NULL, | ||
schedule_interval interval NOT NULL, | ||
max_runtime interval NOT NULL, | ||
max_retries integer NOT NULL, | ||
retry_period interval NOT NULL, | ||
proc_schema name NOT NULL, | ||
proc_name name NOT NULL, | ||
owner regrole NOT NULL DEFAULT current_role::regrole, | ||
scheduled bool NOT NULL DEFAULT TRUE, | ||
fixed_schedule bool not null default true, | ||
initial_start timestamptz, | ||
hypertable_id integer, | ||
config jsonb, | ||
check_schema name, | ||
check_name name, | ||
timezone text, | ||
CONSTRAINT bgw_job_pkey PRIMARY KEY (id), | ||
CONSTRAINT bgw_job_hypertable_id_fkey FOREIGN KEY (hypertable_id) REFERENCES _timescaledb_catalog.hypertable (id) ON DELETE CASCADE | ||
); | ||
|
||
ALTER SEQUENCE _timescaledb_config.bgw_job_id_seq OWNED BY _timescaledb_config.bgw_job.id; | ||
CREATE INDEX bgw_job_proc_hypertable_id_idx | ||
ON _timescaledb_config.bgw_job(proc_schema,proc_name,hypertable_id); | ||
INSERT INTO _timescaledb_config.bgw_job | ||
SELECT * FROM _timescaledb_config.bgw_job_tmp ORDER BY id; | ||
DROP TABLE _timescaledb_config.bgw_job_tmp; | ||
ALTER TABLE _timescaledb_internal.bgw_job_stat | ||
ADD CONSTRAINT bgw_job_stat_job_id_fkey | ||
FOREIGN KEY(job_id) | ||
REFERENCES _timescaledb_config.bgw_job(id) | ||
ON DELETE CASCADE; | ||
ALTER TABLE _timescaledb_internal.bgw_policy_chunk_stats | ||
ADD CONSTRAINT bgw_policy_chunk_stats_job_id_fkey | ||
FOREIGN KEY(job_id) | ||
REFERENCES _timescaledb_config.bgw_job(id) | ||
ON DELETE CASCADE; | ||
|
||
SELECT pg_catalog.pg_extension_config_dump('_timescaledb_config.bgw_job', 'WHERE id >= 1000'); | ||
GRANT SELECT ON _timescaledb_config.bgw_job TO PUBLIC; | ||
GRANT SELECT ON _timescaledb_config.bgw_job_id_seq TO PUBLIC; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
DROP FUNCTION _timescaledb_internal.ping_data_node(NAME, INTERVAL); | ||
|
||
CREATE OR REPLACE FUNCTION _timescaledb_internal.ping_data_node(node_name NAME) RETURNS BOOLEAN | ||
AS '@MODULE_PATHNAME@', 'ts_data_node_ping' LANGUAGE C VOLATILE; | ||
|
||
-- drop dependent views | ||
DROP VIEW IF EXISTS timescaledb_information.job_errors; | ||
DROP VIEW IF EXISTS timescaledb_information.job_stats; | ||
DROP VIEW IF EXISTS timescaledb_information.jobs; | ||
DROP VIEW IF EXISTS timescaledb_experimental.policies; | ||
|
||
ALTER TABLE _timescaledb_config.bgw_job | ||
ALTER COLUMN owner DROP DEFAULT, | ||
ALTER COLUMN owner TYPE name USING owner::name, | ||
ALTER COLUMN owner SET DEFAULT current_role; | ||
CREATE TABLE _timescaledb_config.bgw_job_tmp AS SELECT * FROM _timescaledb_config.bgw_job; | ||
|
||
ALTER EXTENSION timescaledb DROP TABLE _timescaledb_config.bgw_job; | ||
ALTER EXTENSION timescaledb DROP SEQUENCE _timescaledb_config.bgw_job_id_seq; | ||
ALTER TABLE _timescaledb_internal.bgw_job_stat | ||
DROP CONSTRAINT IF EXISTS bgw_job_stat_job_id_fkey; | ||
ALTER TABLE _timescaledb_internal.bgw_policy_chunk_stats | ||
DROP CONSTRAINT IF EXISTS bgw_policy_chunk_stats_job_id_fkey; | ||
CREATE TABLE _timescaledb_internal.tmp_bgw_job_seq_value AS | ||
SELECT last_value, is_called FROM _timescaledb_config.bgw_job_id_seq; | ||
DROP TABLE _timescaledb_config.bgw_job; | ||
|
||
CREATE SEQUENCE _timescaledb_config.bgw_job_id_seq MINVALUE 1000; | ||
SELECT pg_catalog.pg_extension_config_dump('_timescaledb_config.bgw_job_id_seq', ''); | ||
SELECT pg_catalog.setval('_timescaledb_config.bgw_job_id_seq', last_value, is_called) | ||
FROM _timescaledb_internal.tmp_bgw_job_seq_value; | ||
DROP TABLE _timescaledb_internal.tmp_bgw_job_seq_value; | ||
|
||
CREATE TABLE _timescaledb_config.bgw_job ( | ||
id integer NOT NULL DEFAULT nextval('_timescaledb_config.bgw_job_id_seq'), | ||
application_name name NOT NULL, | ||
schedule_interval interval NOT NULL, | ||
max_runtime interval NOT NULL, | ||
max_retries integer NOT NULL, | ||
retry_period interval NOT NULL, | ||
proc_schema name NOT NULL, | ||
proc_name name NOT NULL, | ||
owner name NOT NULL DEFAULT current_role, | ||
scheduled bool NOT NULL DEFAULT TRUE, | ||
fixed_schedule bool not null default true, | ||
initial_start timestamptz, | ||
hypertable_id integer, | ||
config jsonb, | ||
check_schema name, | ||
check_name name, | ||
timezone text, | ||
CONSTRAINT bgw_job_pkey PRIMARY KEY (id), | ||
CONSTRAINT bgw_job_hypertable_id_fkey FOREIGN KEY (hypertable_id) REFERENCES _timescaledb_catalog.hypertable (id) ON DELETE CASCADE | ||
); | ||
|
||
ALTER SEQUENCE _timescaledb_config.bgw_job_id_seq OWNED BY _timescaledb_config.bgw_job.id; | ||
CREATE INDEX bgw_job_proc_hypertable_id_idx | ||
ON _timescaledb_config.bgw_job(proc_schema,proc_name,hypertable_id); | ||
INSERT INTO _timescaledb_config.bgw_job | ||
SELECT * FROM _timescaledb_config.bgw_job_tmp ORDER BY id; | ||
DROP TABLE _timescaledb_config.bgw_job_tmp; | ||
ALTER TABLE _timescaledb_internal.bgw_job_stat | ||
ADD CONSTRAINT bgw_job_stat_job_id_fkey | ||
FOREIGN KEY(job_id) | ||
REFERENCES _timescaledb_config.bgw_job(id) | ||
ON DELETE CASCADE; | ||
ALTER TABLE _timescaledb_internal.bgw_policy_chunk_stats | ||
ADD CONSTRAINT bgw_policy_chunk_stats_job_id_fkey | ||
FOREIGN KEY(job_id) | ||
REFERENCES _timescaledb_config.bgw_job(id) | ||
ON DELETE CASCADE; | ||
|
||
SELECT pg_catalog.pg_extension_config_dump('_timescaledb_config.bgw_job', 'WHERE id >= 1000'); | ||
GRANT SELECT ON _timescaledb_config.bgw_job TO PUBLIC; | ||
GRANT SELECT ON _timescaledb_config.bgw_job_id_seq TO PUBLIC; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +0,0 @@ | ||
DROP FUNCTION _timescaledb_internal.ping_data_node(NAME); | ||
|
||
CREATE OR REPLACE FUNCTION _timescaledb_internal.ping_data_node(node_name NAME, timeout INTERVAL = NULL) RETURNS BOOLEAN | ||
AS '@MODULE_PATHNAME@', 'ts_data_node_ping' LANGUAGE C VOLATILE; | ||
|
||
-- drop dependent views | ||
DROP VIEW IF EXISTS timescaledb_information.job_errors; | ||
DROP VIEW IF EXISTS timescaledb_information.job_stats; | ||
DROP VIEW IF EXISTS timescaledb_information.jobs; | ||
DROP VIEW IF EXISTS timescaledb_experimental.policies; | ||
|
||
ALTER TABLE _timescaledb_config.bgw_job | ||
ALTER COLUMN owner DROP DEFAULT, | ||
ALTER COLUMN owner TYPE regrole USING owner::regrole, | ||
ALTER COLUMN owner SET DEFAULT current_role::regrole; | ||
CREATE TABLE _timescaledb_config.bgw_job_tmp AS SELECT * FROM _timescaledb_config.bgw_job; | ||
|
||
ALTER EXTENSION timescaledb DROP TABLE _timescaledb_config.bgw_job; | ||
ALTER EXTENSION timescaledb DROP SEQUENCE _timescaledb_config.bgw_job_id_seq; | ||
ALTER TABLE _timescaledb_internal.bgw_job_stat | ||
DROP CONSTRAINT IF EXISTS bgw_job_stat_job_id_fkey; | ||
ALTER TABLE _timescaledb_internal.bgw_policy_chunk_stats | ||
DROP CONSTRAINT IF EXISTS bgw_policy_chunk_stats_job_id_fkey; | ||
CREATE TABLE _timescaledb_internal.tmp_bgw_job_seq_value AS | ||
SELECT last_value, is_called FROM _timescaledb_config.bgw_job_id_seq; | ||
DROP TABLE _timescaledb_config.bgw_job; | ||
|
||
CREATE SEQUENCE _timescaledb_config.bgw_job_id_seq MINVALUE 1000; | ||
SELECT pg_catalog.pg_extension_config_dump('_timescaledb_config.bgw_job_id_seq', ''); | ||
SELECT pg_catalog.setval('_timescaledb_config.bgw_job_id_seq', last_value, is_called) | ||
FROM _timescaledb_internal.tmp_bgw_job_seq_value; | ||
DROP TABLE _timescaledb_internal.tmp_bgw_job_seq_value; | ||
|
||
CREATE TABLE _timescaledb_config.bgw_job ( | ||
id integer NOT NULL DEFAULT nextval('_timescaledb_config.bgw_job_id_seq'), | ||
application_name name NOT NULL, | ||
schedule_interval interval NOT NULL, | ||
max_runtime interval NOT NULL, | ||
max_retries integer NOT NULL, | ||
retry_period interval NOT NULL, | ||
proc_schema name NOT NULL, | ||
proc_name name NOT NULL, | ||
owner regrole NOT NULL DEFAULT current_role::regrole, | ||
scheduled bool NOT NULL DEFAULT TRUE, | ||
fixed_schedule bool not null default true, | ||
initial_start timestamptz, | ||
hypertable_id integer, | ||
config jsonb, | ||
check_schema name, | ||
check_name name, | ||
timezone text, | ||
CONSTRAINT bgw_job_pkey PRIMARY KEY (id), | ||
CONSTRAINT bgw_job_hypertable_id_fkey FOREIGN KEY (hypertable_id) REFERENCES _timescaledb_catalog.hypertable (id) ON DELETE CASCADE | ||
); | ||
|
||
ALTER SEQUENCE _timescaledb_config.bgw_job_id_seq OWNED BY _timescaledb_config.bgw_job.id; | ||
CREATE INDEX bgw_job_proc_hypertable_id_idx | ||
ON _timescaledb_config.bgw_job(proc_schema,proc_name,hypertable_id); | ||
INSERT INTO _timescaledb_config.bgw_job | ||
SELECT * FROM _timescaledb_config.bgw_job_tmp ORDER BY id; | ||
DROP TABLE _timescaledb_config.bgw_job_tmp; | ||
ALTER TABLE _timescaledb_internal.bgw_job_stat | ||
ADD CONSTRAINT bgw_job_stat_job_id_fkey | ||
FOREIGN KEY(job_id) | ||
REFERENCES _timescaledb_config.bgw_job(id) | ||
ON DELETE CASCADE; | ||
ALTER TABLE _timescaledb_internal.bgw_policy_chunk_stats | ||
ADD CONSTRAINT bgw_policy_chunk_stats_job_id_fkey | ||
FOREIGN KEY(job_id) | ||
REFERENCES _timescaledb_config.bgw_job(id) | ||
ON DELETE CASCADE; | ||
|
||
SELECT pg_catalog.pg_extension_config_dump('_timescaledb_config.bgw_job', 'WHERE id >= 1000'); | ||
GRANT SELECT ON _timescaledb_config.bgw_job TO PUBLIC; | ||
GRANT SELECT ON _timescaledb_config.bgw_job_id_seq TO PUBLIC; | ||
Oops, something went wrong.