Skip to content

Use PG_MODULE_MAGIC_EXT for PG18 - #8868

Merged
svenklemm merged 1 commit into
timescale:mainfrom
fabriziomello:pg18_use_pg_module_magic_ext
Apr 14, 2026
Merged

svenklemm merged 1 commit into
timescale:mainfrom
fabriziomello:pg18_use_pg_module_magic_ext

Conversation

@fabriziomello

@fabriziomello fabriziomello commented Oct 29, 2025 •

Copy link
Copy Markdown
Contributor

postgres/postgres@9324c8c58065

Disable-check: loader-change

@fabriziomello fabriziomello self-assigned this Oct 29, 2025
@fabriziomello
fabriziomello force-pushed the pg18_use_pg_module_magic_ext branch from 6575386 to 85d718b Compare October 29, 2025 20:32
@fabriziomello fabriziomello changed the title Use PG_MODULE_MAGIC_EXT on PG18 Use PG_MODULE_MAGIC_EXT for PG18 Oct 29, 2025
@codecov

codecov Bot commented Oct 29, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@fabriziomello
fabriziomello force-pushed the pg18_use_pg_module_magic_ext branch from 85d718b to 6f23268 Compare October 30, 2025 12:48
@fabriziomello
fabriziomello force-pushed the pg18_use_pg_module_magic_ext branch from 6f23268 to c5d4e87 Compare November 14, 2025 17:18
@fabriziomello
fabriziomello marked this pull request as ready for review November 14, 2025 18:36
Comment thread src/compat/compat.h Outdated
@fabriziomello
fabriziomello force-pushed the pg18_use_pg_module_magic_ext branch 2 times, most recently from 01ed35c to 9486530 Compare November 25, 2025 02:57
@fabriziomello
fabriziomello force-pushed the pg18_use_pg_module_magic_ext branch from 9486530 to 8162208 Compare December 11, 2025 17:50
@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to lack of activity. This pull request will be closed in 30 days.

@fabriziomello
fabriziomello force-pushed the pg18_use_pg_module_magic_ext branch from 8162208 to 6873ab8 Compare January 22, 2026 19:42
@fabriziomello
fabriziomello requested a review from a team January 22, 2026 19:42
Comment thread src/compat/compat.h Outdated
@fabriziomello
fabriziomello force-pushed the pg18_use_pg_module_magic_ext branch 2 times, most recently from dace9ad to 014c677 Compare February 10, 2026 15:49

@tureba tureba left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@fabriziomello
fabriziomello force-pushed the pg18_use_pg_module_magic_ext branch from 014c677 to ff725a8 Compare February 10, 2026 19:11
@fabriziomello
fabriziomello force-pushed the pg18_use_pg_module_magic_ext branch from ff725a8 to 9ce1841 Compare February 19, 2026 21:25
@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to lack of activity. This pull request will be closed in 30 days.

@fabriziomello
fabriziomello force-pushed the pg18_use_pg_module_magic_ext branch from 9ce1841 to adc7514 Compare April 4, 2026 04:11
@svenklemm
svenklemm force-pushed the pg18_use_pg_module_magic_ext branch from adc7514 to 50f20e8 Compare April 14, 2026 13:36
@svenklemm svenklemm added this to the v2.27.0 milestone Apr 14, 2026
@svenklemm
svenklemm merged commit 3fa74dc into timescale:main Apr 14, 2026
48 checks passed
surister added a commit that referenced this pull request May 12, 2026
## 2.27.0 (2026-05-12)

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

**Highlighted features in TimescaleDB v2.27.0**
* The Hypercore engine now supports a vectorized implementation of
filters by evaluating them inline through the standard Postgres function
path. This expands the set of queries (including continuous aggregate
refreshes) that can take the faster path through the columnstore,
yielding speedups ranging from 30% up to 2x in benchmarks.
* `UPDATE` and `DELETE` statements with equality predicates can now use
bloom filters to skip decompressing batches whose compressed rows can't
match. When multiple bloom filters apply, they are evaluated in
decreasing order of column count (most selective first), and EXPLAIN now
reports filtering activity via the new "Compressed batches filtered" and
"Batches filtered after decompression counters". The query performance
increases in some case up to 160 times.
* `UPSERT` queries can now leverage bloom filters (including composite
ones) to skip decompressing batches when the arbiter values are
guaranteed not to be present, with the most-selective filter chosen
automatically when multiple apply. EXPLAIN output adds new statistics —
batches checked by bloom, batches pruned by bloom, batches without
bloom, and bloom false positives — for visibility into pruning
effectiveness.

**Upcoming PostgreSQL 15 EOL announcement**
As a reminder, the upcoming TimescaleDB release in June 2026 will
officially be the last version with support for PostgreSQL 15. This
deprecation was initially announced in the [v2.23.0
changelog](https://github.com/timescale/timescaledb/releases/tag/2.23.0)
on October 29, 2025, to provide users ample time to prepare. To ensure
uninterrupted access to new features, bugfixes and performance
enhancements, all instances must be upgraded to PostgreSQL 16 or
greater.

**Backward-Incompatible Changes**
* [#9579](#9579) The bloom
filter sparse indexes on compressed `int2` columns could lead to
`SELECT` queries not returning the rows that actually match the `WHERE`
condition. The upgrade is blocked for the affected databases, and the
incorrect indexes have to be dropped manually before the upgrade.
* This release introduces a new naming convention for composite bloom
filter metadata. While this change will not disrupt query processing,
v2.27 cannot automatically utilize composite bloom filters generated in
v2.26. To convert your existing v2.26 composite bloom filters, the
legacy metadata columns must be renamed. This is a lightweight,
catalog-only operation requiring zero data recompression, which can be
done with [this migration
script](https://github.com/timescale/timescaledb-extras/blob/main/utils/2.27.x-fix-composite-bloom-columns.sql).

**Features**
* [#8868](#8868) Use
`PG_MODULE_MAGIC_EXT` for `PG18`
* [#8967](#8967) Rewriting
queries with continuous aggregates exactly matching query aggregation
* [#9192](#9192) Push down
scalar array operations into the columnar metadata scan by transforming
them into an `OR`/`AND` clause.
* [#9355](#9355) Defer
`segmentby` default for direct compress
* [#9374](#9374) Use bloom
filters to eliminate decompression of unrelated compressed batches
during `UPSERT`s.
* [#9396](#9396) Analyze
and get `segmentby` during direct compress
* [#9398](#9398) Fix chunk
exclusion for `IN`/`ANY` on open (time) dimensions
* [#9399](#9399) Use bloom
filters to reduce decompression during `UPDATE`/`DELETE` commands.
* [#9403](#9403) Set
default `segmentby` during direct compress flush
* [#9437](#9437) Allow
running compression as part of refresh policy for compressed continuous
aggregates
* [#9443](#9443) Enable
vectorized aggregation in some cases when the `WHERE` clause contains
filters not handled through the "Vectorized Filters" facility. This
includes e.g. filters on `time_bucket()`.
* [#9458](#9458) Remove
`_timescaledb_functions.repair_relation_acls`
* [#9475](#9475) Calculate
hashes for bloom filter predicates at planning time.
* [#9504](#9504) Allow
`ALTER TABLE RESET` on materialization hypertables
* [#9521](#9521) Add
support for reporting index creation progress
* [#9559](#9559) Notice on
compression settings change
* [#9569](#9569) For
nullable `orderby` columns do segmentwise decompress-compress instead of
segmentwise recompress.
* [#9583](#9583) Drop
existing sparse indexes when dropping columns
* [#9648](#9648) Support
`ENABLE`/`DISABLE TRIGGER` on hypertables
* [#9702](#9702) Allow
Batch Sorted Merge for unordered chunks with no `segmentby` or when all
`segmentby` columns are pinned to a `Const`

**Bugfixes**
* [#9363](#9363) Change
compression job status when chunks could be compressed
* [#9413](#9413) Fix
incorrect decompress markers on full batch delete
* [#9414](#9414) Fix `NULL`
compression handling in `estimate_uncompressed_size`
* [#9417](#9417) Fix
segfault in `bloom1_contains`
* [#9479](#9479) Disallow
sub-day offset for `time-bucket` on `Date`
* [#9482](#9482) Forbid
Batch Sort Merge on nullable `orderby` columns
* [#9490](#9490) Disallow
negative interval as `chunk_interval`
* [#9500](#9500) Fix
off-by-one error when building object name
* [#9519](#9519) Remove
self-referential `FOREIGN KEY` constraints from catalog
* [#9561](#9561) Simplify
job history retention by replacing binary search and temp table
* [#9590](#9590) Fix policy
skipping uncompressed chunks
* [#9596](#9596) Remove
unused `process_hypertable_invalidations` policy code
* [#9604](#9604) Remove
dead `post_parse_analyze_hook` capture in loader
* [#9610](#9610) Fix
use-after-free crash in `cache_destroy` during transaction abort
* [#9632](#9632) Preserve
chunk settings during recompress
* [#9640](#9640) Fix `NULL`
`datumCopy` crash in `segmentby` analysis
* [#9680](#9680) Fix
segfault in direct compress insert on hypertable with dropped column
* [#9692](#9692) Fix
internal "invalid perminfoindex 0 in RTE" error on `MERGE NOT MATCHED
INSERT` into a hypertable
* [#9705](#9705) Avoid
double `TOAST` delete when `DELETE-after-compression` is enabled
* [#9705](#9705) Only
freeze compressed rows when truncating uncompressed chunk
* [#9706](#9706) Use
`bigint` in `estimate_uncompressed_size` calculations
* [#9709](#9709) Reject
mismatched element type in `bool`/`uuid` decompression
* [#9710](#9710) Return
`bigint` from `compressed_data_column_size`
* [#9711](#9711) Fix
registration row leak when continuous aggregate refresh fails
* [#9697](#9697) Improve
`pathkey` handling for compressed sub-paths during sort transformation
* [#9743](#9743) Fix the
composite bloom metadata column naming scheme
* [#9767](#9767) Skip
dropped chunks when trying to remove `ts_cagg_invalidation_trigger`
* [#9747](#9747) Reject
inheriting from a hypertable
* [#9744](#9744) Use a
fixed call string for the telemetry job in `ts_stat_statements`
recording
* [#9736](#9736) Do logical
sparse index comparison
* [#9731](#9731) Avoid
creating overlapping batches during recompression for multi orderby
configurations
* [#9717](#9717) Reject
non-positive time bucket width on cagg creation
* [#9707](#9707) Fix policy
name comparison in remove_policies

**New Settings**
* `enable_cagg_rewrites`: enables rewriting queries with CAggs. Off by
default. `cagg_rewrites_debug_info`: prints CAgg rewrites diagnostics.
Off by default.
* `enable_columnar_scan_filter_pushdown`: enables pushing the filters on
columnar scan down to the compressed scan level. On by default.

**Thanks**
* @fabriziomello for adding support for `PG_MODULE_MAGIC_EXT`
* @maltalex for reporting an issue with index creation progress
reporting
* @pavanmanishd for the first version of the fix for #9743
* @h0rn3t for reporting issue with recompression creating overlapping
batches

---------

Co-authored-by: timescale-automation <123763385+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ivan Sanchez <surister98@gmail.com>
Co-authored-by: philkra <philip@philipkrauss.at>
@timescale-automation timescale-automation added the released-2.27.0 Released in 2.27.0 label May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pg18 released-2.27.0 Released in 2.27.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants