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

Release 2.18.0 (Test PR) #7534

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .unreleased/pr_6901

This file was deleted.

1 change: 0 additions & 1 deletion .unreleased/pr_7104

This file was deleted.

1 change: 0 additions & 1 deletion .unreleased/pr_7271

This file was deleted.

1 change: 0 additions & 1 deletion .unreleased/pr_7295

This file was deleted.

2 changes: 0 additions & 2 deletions .unreleased/pr_7378

This file was deleted.

1 change: 0 additions & 1 deletion .unreleased/pr_7390

This file was deleted.

1 change: 0 additions & 1 deletion .unreleased/pr_7409

This file was deleted.

1 change: 0 additions & 1 deletion .unreleased/pr_7411

This file was deleted.

1 change: 0 additions & 1 deletion .unreleased/pr_7412

This file was deleted.

1 change: 0 additions & 1 deletion .unreleased/pr_7413

This file was deleted.

1 change: 0 additions & 1 deletion .unreleased/pr_7426

This file was deleted.

1 change: 0 additions & 1 deletion .unreleased/pr_7432

This file was deleted.

2 changes: 0 additions & 2 deletions .unreleased/pr_7434

This file was deleted.

1 change: 0 additions & 1 deletion .unreleased/pr_7443

This file was deleted.

1 change: 0 additions & 1 deletion .unreleased/pr_7455

This file was deleted.

1 change: 0 additions & 1 deletion .unreleased/pr_7486

This file was deleted.

1 change: 0 additions & 1 deletion .unreleased/pr_7488

This file was deleted.

1 change: 0 additions & 1 deletion .unreleased/pr_7514

This file was deleted.

2 changes: 0 additions & 2 deletions .unreleased/resolve-vars

This file was deleted.

36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,42 @@
`psql` with the `-X` flag to prevent any `.psqlrc` commands from
accidentally triggering the load of a previous DB version.**


## 2.18.0 (2024-12-13)

This release contains performance improvements and bug fixes since
the 2.17.2 release. We recommend that you upgrade at the next
available opportunity.


**Features**
* #6901 Add hypertable support for transition tables
* #7104 Hypercore table access method
* #7271 Push down ORDER BY in real time continuous aggregate queries
* #7295: Support ALTER TABLE SET ACCESS METHOD on hypertable.
* #7390 Disable custom hashagg planner code
* #7411 Change parameter name to enable Hypercore TAM
* #7412 Add GUC for hypercore_use_access_method default
* #7413: Add GUC for segmentwise recompression.
* #7443 Add Hypercore function and view aliases
* #7455: Support DROP NOT NULL on compressed hypertables
* #7486 Prevent building against postgres versions with broken ABI

**Bugfixes**
* #7378 Remove obsolete job referencing policy_job_error_retention
* #7409 Update bgw job table when altering procedure
* #7410 "aggregated compressed column not found" error on aggregation query.
* #7426 Fix datetime parsing error in chunk constraint creation
* #7432 Verify that heap tuple is valid before using
* #7434 Fixes segfault when internally set the replica identity for a given chunk
* #7488 Emit error for transition table trigger on chunks
* #7514 Fix error: invalid child of chunk append

**Thanks**
* @bharrisau for reporting the segfault when creating chunks
* @pgloader for reporting an issue an internal background job
* @uasiddiqi for reporting the "aggregated compressed column not found" error.

## 2.17.2 (2024-11-06)

This release contains bug fixes since the 2.17.1 release. We recommend that you
Expand Down
8 changes: 5 additions & 3 deletions sql/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@ set(MOD_FILES
updates/2.16.0--2.16.1.sql
updates/2.16.1--2.17.0.sql
updates/2.17.0--2.17.1.sql
updates/2.17.1--2.17.2.sql)
updates/2.17.1--2.17.2.sql
updates/2.17.2--2.18.0.sql)

# The downgrade file to generate a downgrade script for the current version, as
# specified in version.config
set(CURRENT_REV_FILE reverse-dev.sql)
set(CURRENT_REV_FILE 2.18.0--2.17.2.sql)
# Files for generating old downgrade scripts. This should only include files for
# downgrade from one version to its previous version since we do not support
# skipping versions when downgrading.
Expand Down Expand Up @@ -90,7 +91,8 @@ set(OLD_REV_FILES
2.16.1--2.16.0.sql
2.17.0--2.16.1.sql
2.17.1--2.17.0.sql
2.17.2--2.17.1.sql)
2.17.2--2.17.1.sql
2.18.0--2.17.2.sql)

set(MODULE_PATHNAME "$libdir/timescaledb-${PROJECT_VERSION_MOD}")
set(LOADER_PATHNAME "$libdir/timescaledb")
Expand Down
116 changes: 116 additions & 0 deletions sql/updates/2.17.2--2.18.0.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
-- remove obsolete job
DELETE FROM _timescaledb_config.bgw_job WHERE id = 2;

-- Hypercore updates
CREATE FUNCTION _timescaledb_debug.is_compressed_tid(tid) RETURNS BOOL
AS '@MODULE_PATHNAME@', 'ts_update_placeholder' LANGUAGE C STRICT;

DROP FUNCTION IF EXISTS @[email protected]_chunk(uncompressed_chunk REGCLASS, if_not_compressed BOOLEAN, recompress BOOLEAN);

CREATE FUNCTION @[email protected]_chunk(
uncompressed_chunk REGCLASS,
if_not_compressed BOOLEAN = true,
recompress BOOLEAN = false,
hypercore_use_access_method BOOL = NULL
) RETURNS REGCLASS AS '@MODULE_PATHNAME@', 'ts_update_placeholder' LANGUAGE C VOLATILE;

DROP FUNCTION IF EXISTS @[email protected]_compression_policy(hypertable REGCLASS, compress_after "any", if_not_exists BOOL, schedule_interval INTERVAL, initial_start TIMESTAMPTZ, timezone TEXT, compress_created_before INTERVAL);

CREATE FUNCTION @[email protected]_compression_policy(
hypertable REGCLASS,
compress_after "any" = NULL,
if_not_exists BOOL = false,
schedule_interval INTERVAL = NULL,
initial_start TIMESTAMPTZ = NULL,
timezone TEXT = NULL,
compress_created_before INTERVAL = NULL,
hypercore_use_access_method BOOL = NULL
)
RETURNS INTEGER
AS '@MODULE_PATHNAME@', 'ts_update_placeholder'
LANGUAGE C VOLATILE;

DROP FUNCTION IF EXISTS timescaledb_experimental.add_policies(relation REGCLASS, if_not_exists BOOL, refresh_start_offset "any", refresh_end_offset "any", compress_after "any", drop_after "any");

CREATE FUNCTION timescaledb_experimental.add_policies(
relation REGCLASS,
if_not_exists BOOL = false,
refresh_start_offset "any" = NULL,
refresh_end_offset "any" = NULL,
compress_after "any" = NULL,
drop_after "any" = NULL,
hypercore_use_access_method BOOL = NULL)
RETURNS BOOL
AS '@MODULE_PATHNAME@', 'ts_update_placeholder'
LANGUAGE C VOLATILE;

DROP PROCEDURE IF EXISTS _timescaledb_functions.policy_compression_execute(job_id INTEGER, htid INTEGER, lag ANYELEMENT, maxchunks INTEGER, verbose_log BOOLEAN, recompress_enabled BOOLEAN, use_creation_time BOOLEAN);

DROP PROCEDURE IF EXISTS _timescaledb_functions.policy_compression(job_id INTEGER, config JSONB);

CREATE PROCEDURE @[email protected]_to_columnstore(
chunk REGCLASS,
if_not_columnstore BOOLEAN = true,
recompress BOOLEAN = false,
hypercore_use_access_method BOOL = NULL)
AS '@MODULE_PATHNAME@', 'ts_update_placeholder'
LANGUAGE C;

CREATE PROCEDURE @[email protected]_to_rowstore(
chunk REGCLASS,
if_columnstore BOOLEAN = true)
AS '@MODULE_PATHNAME@', 'ts_update_placeholder'
LANGUAGE C;

CREATE PROCEDURE @[email protected]_columnstore_policy(
hypertable REGCLASS,
after "any" = NULL,
if_not_exists BOOL = false,
schedule_interval INTERVAL = NULL,
initial_start TIMESTAMPTZ = NULL,
timezone TEXT = NULL,
created_before INTERVAL = NULL,
hypercore_use_access_method BOOL = NULL
) LANGUAGE C AS '@MODULE_PATHNAME@', 'ts_update_placeholder';

CREATE PROCEDURE @[email protected]_columnstore_policy(
hypertable REGCLASS,
if_exists BOOL = false
) LANGUAGE C AS '@MODULE_PATHNAME@', 'ts_update_placeholder';

CREATE FUNCTION @[email protected]_columnstore_stats (hypertable REGCLASS)
RETURNS TABLE (
chunk_schema name,
chunk_name name,
compression_status text,
before_compression_table_bytes bigint,
before_compression_index_bytes bigint,
before_compression_toast_bytes bigint,
before_compression_total_bytes bigint,
after_compression_table_bytes bigint,
after_compression_index_bytes bigint,
after_compression_toast_bytes bigint,
after_compression_total_bytes bigint,
node_name name)
LANGUAGE SQL
STABLE STRICT
AS 'SELECT * FROM @[email protected]_compression_stats($1)'
SET search_path TO pg_catalog, pg_temp;

CREATE FUNCTION @[email protected]_columnstore_stats (hypertable REGCLASS)
RETURNS TABLE (
total_chunks bigint,
number_compressed_chunks bigint,
before_compression_table_bytes bigint,
before_compression_index_bytes bigint,
before_compression_toast_bytes bigint,
before_compression_total_bytes bigint,
after_compression_table_bytes bigint,
after_compression_index_bytes bigint,
after_compression_toast_bytes bigint,
after_compression_total_bytes bigint,
node_name name)
LANGUAGE SQL
STABLE STRICT
AS 'SELECT * FROM @[email protected]_compression_stats($1)'
SET search_path TO pg_catalog, pg_temp;
59 changes: 59 additions & 0 deletions sql/updates/2.18.0--2.17.2.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
-- Hypercore AM
DROP ACCESS METHOD IF EXISTS hypercore_proxy;
DROP FUNCTION IF EXISTS ts_hypercore_proxy_handler;
DROP ACCESS METHOD IF EXISTS hypercore;
DROP FUNCTION IF EXISTS ts_hypercore_handler;
DROP FUNCTION IF EXISTS _timescaledb_debug.is_compressed_tid;

DROP FUNCTION IF EXISTS @[email protected]_chunk(uncompressed_chunk REGCLASS, if_not_compressed BOOLEAN, recompress BOOLEAN, hypercore_use_access_method BOOL);

CREATE FUNCTION @[email protected]_chunk(
uncompressed_chunk REGCLASS,
if_not_compressed BOOLEAN = true,
recompress BOOLEAN = false
) RETURNS REGCLASS AS '@MODULE_PATHNAME@', 'ts_compress_chunk' LANGUAGE C STRICT VOLATILE;

DROP FUNCTION IF EXISTS @[email protected]_compression_policy(hypertable REGCLASS, compress_after "any", if_not_exists BOOL, schedule_interval INTERVAL, initial_start TIMESTAMPTZ, timezone TEXT, compress_created_before INTERVAL, hypercore_use_access_method BOOL);

CREATE FUNCTION @[email protected]_compression_policy(
hypertable REGCLASS,
compress_after "any" = NULL,
if_not_exists BOOL = false,
schedule_interval INTERVAL = NULL,
initial_start TIMESTAMPTZ = NULL,
timezone TEXT = NULL,
compress_created_before INTERVAL = NULL
)
RETURNS INTEGER
AS '@MODULE_PATHNAME@', 'ts_policy_compression_add'
LANGUAGE C VOLATILE;

DROP FUNCTION IF EXISTS timescaledb_experimental.add_policies(relation REGCLASS, if_not_exists BOOL, refresh_start_offset "any", refresh_end_offset "any", compress_after "any", drop_after "any", hypercore_use_access_method BOOL);

CREATE FUNCTION timescaledb_experimental.add_policies(
relation REGCLASS,
if_not_exists BOOL = false,
refresh_start_offset "any" = NULL,
refresh_end_offset "any" = NULL,
compress_after "any" = NULL,
drop_after "any" = NULL)
RETURNS BOOL
AS '@MODULE_PATHNAME@', 'ts_policies_add'
LANGUAGE C VOLATILE;

DROP PROCEDURE IF EXISTS _timescaledb_functions.policy_compression_execute(job_id INTEGER, htid INTEGER, lag ANYELEMENT, maxchunks INTEGER, verbose_log BOOLEAN, recompress_enabled BOOLEAN, use_creation_time BOOLEAN, useam BOOLEAN);

DROP PROCEDURE IF EXISTS _timescaledb_functions.policy_compression(job_id INTEGER, config JSONB);
DROP PROCEDURE IF EXISTS @[email protected]_to_columnstore(REGCLASS, BOOLEAN, BOOLEAN, BOOLEAN);
DROP PROCEDURE IF EXISTS @[email protected]_to_rowstore(REGCLASS, BOOLEAN);
DROP PROCEDURE IF EXISTS @[email protected]_columnstore_policy(REGCLASS, "any", BOOL, INTERVAL, TIMESTAMPTZ, TEXT, INTERVAL, BOOL);
DROP PROCEDURE IF EXISTS @[email protected]_columnstore_policy(REGCLASS, BOOL);
DROP FUNCTION IF EXISTS @[email protected]_columnstore_stats(REGCLASS);
DROP FUNCTION IF EXISTS @[email protected]_columnstore_stats(REGCLASS);

ALTER EXTENSION timescaledb DROP VIEW timescaledb_information.hypertable_columnstore_settings;
ALTER EXTENSION timescaledb DROP VIEW timescaledb_information.chunk_columnstore_settings;

DROP VIEW timescaledb_information.hypertable_columnstore_settings;
DROP VIEW timescaledb_information.chunk_columnstore_settings;

Loading
Loading