Skip to content

Replace references to compression with columnstore #7977

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

Merged
merged 1 commit into from
Apr 28, 2025

Conversation

kpan2034
Copy link
Member

No description provided.

@kpan2034 kpan2034 force-pushed the rename-to-columnstore branch 2 times, most recently from 65d0ae0 to a66c27d Compare April 16, 2025 21:13
@kpan2034 kpan2034 requested a review from svenklemm April 16, 2025 21:35
@kpan2034 kpan2034 added this to the v2.20.0 milestone Apr 16, 2025
@kpan2034 kpan2034 force-pushed the rename-to-columnstore branch 3 times, most recently from 4dabab3 to b859083 Compare April 23, 2025 19:53
@kpan2034
Copy link
Member Author

There are a few places where we refer to an "internal compressed hypertable", which is now deprecated I think. I have changed those to "columnstore hypertable". I think we can remove all references to it at some point.

@kpan2034 kpan2034 force-pushed the rename-to-columnstore branch 2 times, most recently from 51b9709 to 439b060 Compare April 25, 2025 15:45
@@ -34,3 +34,5 @@ LANGUAGE C VOLATILE;

UPDATE _timescaledb_catalog.hypertable SET chunk_sizing_func_schema = '_timescaledb_functions' WHERE chunk_sizing_func_schema = '_timescaledb_internal' AND chunk_sizing_func_name = 'calculate_chunk_interval';

-- Rename Columnstore Policy jobs to Compression Policy
UPDATE _timescaledb SET application_name = replace(application_name, 'Compression Policy', 'Columnstore Policy');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
UPDATE _timescaledb SET application_name = replace(application_name, 'Compression Policy', 'Columnstore Policy');
UPDATE _timescaledb SET application_name = replace(application_name, 'Compression Policy', 'Columnstore Policy') WHERE application_name LIKE '%Compression Policy%';

@@ -31,3 +31,6 @@ CREATE FUNCTION @[email protected]_continuous_aggregate_policy(
RETURNS INTEGER
AS '@MODULE_PATHNAME@', 'ts_update_placeholder'
LANGUAGE C VOLATILE;

-- Rename Columnstore Policy jobs to Compression Policy
UPDATE _timescaledb_config.bgw_job SET application_name = replace(application_name, 'Columnstore Policy', 'Compression Policy');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
UPDATE _timescaledb_config.bgw_job SET application_name = replace(application_name, 'Columnstore Policy', 'Compression Policy');
UPDATE _timescaledb_config.bgw_job SET application_name = replace(application_name, 'Columnstore Policy', 'Compression Policy') WHERE application_name LIKE '%Columnstore Policy%';

@kpan2034 kpan2034 force-pushed the rename-to-columnstore branch 3 times, most recently from e938823 to b749fee Compare April 25, 2025 22:13
Copy link

codecov bot commented Apr 25, 2025

Codecov Report

Attention: Patch coverage is 37.50000% with 5 lines in your changes missing coverage. Please review.

Project coverage is 82.21%. Comparing base (59f50f2) to head (25dae2c).
Report is 1009 commits behind head on main.

Files with missing lines Patch % Lines
tsl/src/compression/api.c 0.00% 3 Missing and 1 partial ⚠️
tsl/src/compression/create.c 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7977      +/-   ##
==========================================
+ Coverage   80.06%   82.21%   +2.15%     
==========================================
  Files         190      252      +62     
  Lines       37181    46515    +9334     
  Branches     9450    11695    +2245     
==========================================
+ Hits        29770    38244    +8474     
- Misses       2997     3631     +634     
- Partials     4414     4640     +226     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kpan2034 kpan2034 force-pushed the rename-to-columnstore branch from b749fee to dd25c9e Compare April 28, 2025 13:50
@@ -35,3 +35,6 @@ LANGUAGE C VOLATILE;
UPDATE _timescaledb_catalog.hypertable SET chunk_sizing_func_schema = '_timescaledb_functions' WHERE chunk_sizing_func_schema = '_timescaledb_internal' AND chunk_sizing_func_name = 'calculate_chunk_interval';

DROP VIEW IF EXISTS timescaledb_information.hypertables;

-- Rename Columnstore Policy jobs to Compression Policy
UPDATE _timescaledb_config.bgw_job SET application_name = replace(application_name, 'Compression Policy', 'Columnstore Policy') WHERE application_name LIKE '%Compression Policy%';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this touch the existing user-defined jobs? I wouldn't do this not to surprise people, someone might be depending on these names in their app.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should only touch compression policy jobs that were added, not other user-defined actions.

Replace all user-facing references to compression with columnstore.

The general trend followed during the renaming is:
`compression policy` -> `columnstore policy`
`compression` -> `converting to columnstore`
`compressed chunk` -> `columnstore chunk`
`compressing 'X'` -> `converting 'X' to columnstore`
@kpan2034 kpan2034 force-pushed the rename-to-columnstore branch from dd25c9e to 25dae2c Compare April 28, 2025 18:26
@kpan2034 kpan2034 enabled auto-merge (squash) April 28, 2025 18:26
@kpan2034 kpan2034 merged commit 8ef4696 into timescale:main Apr 28, 2025
42 of 43 checks passed
@kpan2034 kpan2034 deleted the rename-to-columnstore branch April 30, 2025 14:29
This was referenced May 7, 2025
philkra added a commit that referenced this pull request May 15, 2025
## 2.20.0 (2025-05-15)

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

**Highlighted features in TimescaleDB v2.20.0**
* The columnstore now leverages *bloom filters* to deliver up to 6x
faster point queries on columns with high cardinality values, such as
UUIDs.
* Major *improvements to the columnstores' backfill process* enable
`UPSERTS` with strict constraints to execute up to 10x faster.
* *SkipScan is now supported in the columnstore*, including for DISTINCT
queries. This enhancement leads to dramatic query performance
improvements of 2000x to 2500x, especially for selective queries.
* SIMD vectorization for the bool data type is now enabled by default.
This change results in a 30–45% increase in performance for analytical
queries with bool clauses on the columnstore.
* *Continuous aggregates* now include experimental support for *window
functions and non-immutable functions*, extending the analytics use
cases they can solve.
* Several quality-of-life improvements have been introduced: job names
for continuous aggregates are now more descriptive, you can assign
custom names to them, and it is now possible to add unique constraints
along with `ADD COLUMN` operations in the columnstore.
* Improved management and optimization of chunks with the ability to
split large uncompressed chunks at a specified point in time using the
`split_chunk` function. This new function complements the existing
`merge_chunk` function that can be used to merge two small chunks into
one larger chunk.
* Enhancements to the default behavior of the columnstore now provide
better *automatic assessments* of `segment by` and `order by` columns,
reducing the need for manual configuration and simplifying initial
setup.

**PostgreSQL 14 support removal announcement**

Following the deprecation announcement for PostgreSQL 14 in TimescaleDB
v2.19.0, PostgreSQL 14 is no longer supported in TimescaleDB v2.20.0.
The currently supported PostgreSQL major versions are 15, 16, and 17.

**Features**
* [#7638](#7638) Bloom
filter sparse indexes for compressed columns. Can be disabled with the
GUC `timescaledb.enable_sparse_index_bloom`
* [#7756](#7756) Add
warning for poor compression ratio
* [#7762](#7762) Speed up
the queries that use minmax sparse indexes on compressed tables by
changing the index TOAST storage type to `MAIN`. This applies to newly
compressed chunks
* [#7785](#7785) Do
`DELETE` instead of `TRUNCATE` when locks aren't acquired
* [#7852](#7852) Allow
creating foreign key constraints on compressed tables
* [#7854](#7854) Remove
support for PG14
* [#7864](#7854) Allow
adding CHECK constraints to compressed chunks
* [#7868](#7868) Allow
adding columns with `CHECK` constraints to compressed chunks
* [#7874](#7874) Support
for SkipScan for distinct aggregates over the same column
* [#7877](#7877) Remove
blocker for unique constraints with `ADD COLUMN`
* [#7878](#7878) Don't
block non-immutable functions in continuous aggregates
* [#7880](#7880) Add
experimental support for window functions in continuous aggregates
* [#7899](#7899) Vectorized
decompression and filtering for boolean columns
* [#7915](#7915) New option
`refresh_newest_first` to continuous aggregate refresh policy API
* [#7917](#7917) Remove
`_timescaledb_functions.create_chunk_table` function
* [#7929](#7929) Add
`CREATE TABLE ... WITH` API for creating hypertables
* [#7946](#7946) Add
support for splitting a chunk
* [#7958](#7958) Allow
custom names for jobs
* [#7972](#7972) Add
vectorized filtering for constraint checking while backfilling into
compressed chunks
* [#7976](#7976) Include
continuous aggregate name in jobs informational view
* [#7977](#7977) Replace
references to compression with columnstore
* [#7981](#7981) Add
columnstore as alias for `enable_columnstore `in `ALTER TABLE`
* [#7983](#7983) Support
for SkipScan over compressed data
* [#7991](#7991) Improves
default `segmentby` options
* [#7992](#7992) Add API
into hypertable invalidation log
* [#8000](#8000) Add
primary dimension info to information schema
* [#8005](#8005) Support
`ALTER TABLE SET (timescaledb.chunk_time_interval='1 day')`
* [#8012](#8012) Add event
triggers support on chunk creation
* [#8014](#8014) Enable
bool compression by default by setting
`timescaledb.enable_bool_compression=true`. Note: for downgrading to
`2.18` or earlier version, use [this downgrade
script](https://github.com/timescale/timescaledb-extras/blob/master/utils/2.19.0-downgrade_new_compression_algorithms.sql)
* [#8018](#8018) Add
spin-lock during recompression on unique constraints
* [#8026](#8026) Allow
`WHERE` conditions that use nonvolatile functions to be pushed down to
the compressed scan level. For example, conditions like `time > now()`,
where `time` is a columnstore `orderby` column, will evaluate `now()`
and use the sparse index on `time` to filter out the entire compressed
batches that cannot contain matching rows.
* [#8027](#8027) Add
materialization invalidations API
* [#8047](#8027) Support
SkipScan for `SELECT DISTINCT` with multiple distincts when all but one
distinct is pinned
* [#8115](#8115) Add batch
size limiting during compression

**Bugfixes**
* [#7862](#7862) Release
cache pin when checking for `NOT NULL`
* [#7909](#7909) Update
compression stats when merging chunks
* [#7928](#7928) Don't
create a hypertable for implicitly published tables
* [#7982](#7982) Fix crash
in batch sort merge over eligible expressions
* [#8008](#8008) Fix
compression policy error message that shows number of successes
* [#8031](#8031) Fix
reporting of deleted tuples for direct batch delete
* [#8033](#8033) Skip
default `segmentby` if `orderby` is explicitly set
* [#8061](#8061) Ensure
settings for a compressed relation are found
* [#7515](#7515) Add
missing lock to Constraint-aware append
* [#8067](#8067) Make sure
hypercore TAM parent is vacuumed
* [#8074](#8074) Fix memory
leak in row compressor flush
* [#8099](#8099) Block
chunk merging on multi-dimensional hypertables
* [#8106](#8106) Fix
segfault when adding unique compression indexes to compressed chunks
* [#8127](#8127) Read
bit-packed version of booleans

**GUCs**
* `timescaledb.enable_sparse_index_bloom`: Enable creation of the bloom1
sparse index on compressed chunks; Default: `ON`
* `timescaledb.compress_truncate_behaviour`: Defines how truncate
behaves at the end of compression; Default: `truncate_only`
* `timescaledb.enable_compression_ratio_warnings`: Enable warnings for
poor compression ratio; Default: `ON`
* `timescaledb.enable_event_triggers`: Enable event triggers for chunks
creation; Default: `OFF`
* `timescaledb.enable_cagg_window_functions`: Enable window functions in
continuous aggregates; Default: `OFF`

**Thanks**
* @arajkumar for reporting that implicitly published tables were still
able to create hypertables
* @thotokraa for reporting an issue with unique expression indexes on
compressed chunks

---------

Signed-off-by: Philip Krauss <[email protected]>
Signed-off-by: Ramon Guiu <[email protected]>
Co-authored-by: Anastasiia Tovpeko <[email protected]>
Co-authored-by: Ramon Guiu <[email protected]>
@akuzm akuzm added the released-2.20.0 Released in 2.20.0 label May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants