Skip to content

Make hypertables support replica identity#5515

Merged
erimatnor merged 1 commit intotimescale:mainfrom
erimatnor:replica-identity
Jun 27, 2023
Merged

Make hypertables support replica identity#5515
erimatnor merged 1 commit intotimescale:mainfrom
erimatnor:replica-identity

Conversation

@erimatnor
Copy link
Copy Markdown
Member

@erimatnor erimatnor commented Mar 31, 2023

Add support for setting replica identity on hypertables via ALTER
TABLE. The replica identity is used in logical replication to identify
rows that have changed.

Currently, replica identity can only be altered on hypertables via the
root; changing it directly on chunks will raise an error.

@fabriziomello
Copy link
Copy Markdown
Contributor

Why not support it for new chunks?? Users can be confused for the mix of chunks with and without the replica-identity, no?

@noctarius
Copy link
Copy Markdown
Contributor

noctarius commented Apr 8, 2023

I agree with @fabriziomello. Especially since it'll create issues with update / delete statements on later created chunks.

Tried to implement it. While it works, not sure this is the best way 😅

replica-identity-new-chunks.patch

@erimatnor
Copy link
Copy Markdown
Member Author

@fabriziomello I put this draft PR together as a proof-of-concept for @noctarius, thus supporting on new chunks is not yet implemented.

@noctarius
Copy link
Copy Markdown
Contributor

@erimatnor feel free to apply my patch which will actually add the new table support :)

@erimatnor erimatnor force-pushed the replica-identity branch 3 times, most recently from cbc7b0c to b44375a Compare June 7, 2023 14:06
@codecov
Copy link
Copy Markdown

codecov bot commented Jun 7, 2023

Codecov Report

Merging #5515 (fccb360) into main (33a3e10) will increase coverage by 0.01%.
The diff coverage is 95.74%.

@@            Coverage Diff             @@
##             main    #5515      +/-   ##
==========================================
+ Coverage   87.87%   87.88%   +0.01%     
==========================================
  Files         239      239              
  Lines       55658    55693      +35     
  Branches    12328    12334       +6     
==========================================
+ Hits        48910    48947      +37     
+ Misses       4858     4840      -18     
- Partials     1890     1906      +16     
Impacted Files Coverage Δ
src/chunk_index.h 100.00% <ø> (ø)
src/hypertable.c 85.67% <ø> (+0.03%) ⬆️
tsl/src/remote/dist_ddl.c 93.22% <ø> (ø)
src/process_utility.c 92.66% <92.85%> (+0.04%) ⬆️
src/chunk.c 90.03% <100.00%> (+0.08%) ⬆️
src/chunk_index.c 93.33% <100.00%> (ø)

... and 24 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@erimatnor erimatnor force-pushed the replica-identity branch 2 times, most recently from d5bdd5c to ba3d5ae Compare June 8, 2023 12:13
@erimatnor erimatnor marked this pull request as ready for review June 8, 2023 12:55
@erimatnor
Copy link
Copy Markdown
Member Author

@fabriziomello @noctarius Completed the functionality in the PR and added tests.

@erimatnor erimatnor added the enhancement An enhancement to an existing feature for functionality label Jun 8, 2023
Copy link
Copy Markdown
Contributor

@mkindahl mkindahl left a comment

Choose a reason for hiding this comment

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

Could you elaborate on the description in the commit message a little more. It is not very clear what this means.

Copy link
Copy Markdown
Contributor

@mkindahl mkindahl left a comment

Choose a reason for hiding this comment

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

A minor comment, but also something that probably needs to be checked.

Comment on lines +3255 to +3257
errmsg("index \"%s\" for table \"%s\" does not exist",
stmt->name,
get_rel_name(ht->main_table_relid))));
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.

We are printing full names elsewhere.

Suggested change
errmsg("index \"%s\" for table \"%s\" does not exist",
stmt->name,
get_rel_name(ht->main_table_relid))));
errmsg("index \"%s\" for table \"%s.%s\" does not exist",
stmt->name,
get_namespace_name(hyper_schema_oid),
get_rel_name(ht->main_table_relid))));

@noctarius
Copy link
Copy Markdown
Contributor

I'm happy to do a review, but I'm not deep enough into PG sources to find potential issues or oversights in the implementation 😅

Copy link
Copy Markdown
Contributor

@mkindahl mkindahl left a comment

Choose a reason for hiding this comment

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

Approving, but please print the full name of the table like we do elsewhere.

@erimatnor
Copy link
Copy Markdown
Member Author

Could you elaborate on the description in the commit message a little more. It is not very clear what this means.

It is enabling standard PostgreSQL functionality that we previously blocked. I will elaborate, but probably best to refer to PostgreSQL docs.

@erimatnor erimatnor force-pushed the replica-identity branch 2 times, most recently from 81c60fe to e5d3b2c Compare June 27, 2023 12:21
Add support for setting replica identity on hypertables via ALTER
TABLE. The replica identity is used in logical replication to identify
rows that have changed.

Currently, replica identity can only be altered on hypertables via the
root; changing it directly on chunks will raise an error.
@erimatnor erimatnor merged commit e2e7e5f into timescale:main Jun 27, 2023
@erimatnor erimatnor deleted the replica-identity branch June 27, 2023 13:07
noctarius added a commit to noctarius/timescaledb that referenced this pull request Jul 11, 2023
This commit is a follow up of timescale#5515, which added support for
ALTER TABLE ... REPLICA IDENTITY (FULL | INDEX) on hypertables.

This commit allows the execution against materialized hypertables
to enable update / delete operations on continuous aggregates
when logical replication in enabled for them.
noctarius added a commit to noctarius/timescaledb that referenced this pull request Jul 11, 2023
This commit is a follow up of timescale#5515, which added support for
ALTER TABLE ... REPLICA IDENTITY (FULL | INDEX) on hypertables.

This commit allows the execution against materialized hypertables
to enable update / delete operations on continuous aggregates
when logical replication in enabled for them.
noctarius added a commit to noctarius/timescaledb that referenced this pull request Jul 11, 2023
This commit is a follow up of timescale#5515, which added support for
ALTER TABLE ... REPLICA IDENTITY (FULL | INDEX) on hypertables.

This commit allows the execution against materialized hypertables
to enable update / delete operations on continuous aggregates
when logical replication in enabled for them.
noctarius added a commit that referenced this pull request Jul 12, 2023
This commit is a follow up of #5515, which added support for ALTER TABLE
... REPLICA IDENTITY (FULL | INDEX) on hypertables.

This commit allows the execution against materialized hypertables to
enable update / delete operations on continuous aggregates when logical
replication in enabled for them.
svenklemm added a commit to svenklemm/timescaledb that referenced this pull request Sep 20, 2023
This release contains performance improvements for compressed hypertables
and continuous aggregates and bug fixes since the 2.11.2 release.
We recommend that you upgrade at the next available opportunity.

This release moves all internal functions from the _timescaleb_internal
schema into the _timescaledb_functions schema. This separates code from
internal data objects and improves security by allowing more restrictive
permissions for the code schema. If you are calling any of those internal
functions you should adjust your code as soon as possible. This version
also includes a compatibility layer that allows calling them in the old
location but that layer will be removed in 2.14.0.

**PostgreSQL 12 support removal announcement**
Following the deprecation announcement for PostgreSQL 12 in TimescaleDB 2.10,
PostgreSQL 12 is not supported starting with TimescaleDB 2.12.
Currently supported PostgreSQL major versions are 13, 14 and 15.
PostgreSQL 16 support will be added with a following TimescaleDB release.

**Features**
* timescale#5137 Insert into index during chunk compression
* timescale#5150 MERGE support on hypertables
* timescale#5515 Make hypertables support replica identity
* timescale#5586 Index scan support during UPDATE/DELETE on compressed hypertables
* timescale#5596 Support for partial aggregations at chunk level
* timescale#5599 Enable ChunkAppend for partially compressed chunks
* timescale#5655 Improve the number of parallel workers for decompression
* timescale#5758 Enable altering job schedule type through `alter_job`
* timescale#5805 Make logrepl markers for (partial) decompressions
* timescale#5809 Relax invalidation threshold table-level lock to row-level when refreshing a Continuous Aggregate
* timescale#5839 Support CAgg names in chunk_detailed_size
* timescale#5852 Make set_chunk_time_interval CAggs aware
* timescale#5868 Allow ALTER TABLE ... REPLICA IDENTITY (FULL|INDEX) on materialized hypertables (continuous aggregates)
* timescale#5875 Add job exit status and runtime to log
* timescale#5909 CREATE INDEX ONLY ON hypertable creates index on chunks

**Bugfixes**
* timescale#5860 Fix interval calculation for hierarchical CAggs
* timescale#5894 Check unique indexes when enabling compression
* timescale#5951 _timescaledb_internal.create_compressed_chunk doesn't account for existing uncompressed rows
* timescale#5988 Move functions to _timescaledb_functions schema
* timescale#5788 Chunk_create must add an existing table or fail
* timescale#5872 Fix duplicates on partially compressed chunk reads
* timescale#5918 Fix crash in COPY from program returning error
* timescale#5990 Place data in first/last function in correct mctx
* timescale#5991 Call eq_func correctly in time_bucket_gapfill
* timescale#6015 Correct row count in EXPLAIN ANALYZE INSERT .. ON CONFLICT output
* timescale#6035 Fix server crash on UPDATE of compressed chunk
* timescale#6044 Fix server crash when using duplicate segmentby column
* timescale#6045 Fix segfault in set_integer_now_func
* timescale#6053 Fix approximate_row_count for CAggs
* timescale#6081 Improve compressed DML datatype handling
* timescale#6084 Propagate parameter changes to decompress child nodes

**Thanks**
* @ajcanterbury for reporting a problem with lateral joins on compressed chunks
* @alexanderlaw for reporting multiple server crashes
* @lukaskirner for reporting a bug with monthly continuous aggregates
* @mrksngl for reporting a bug with unusual user names
* @willsbit for reporting a crash in time_bucket_gapfill
@svenklemm svenklemm mentioned this pull request Sep 20, 2023
svenklemm added a commit that referenced this pull request Sep 20, 2023
This release contains performance improvements for compressed hypertables
and continuous aggregates and bug fixes since the 2.11.2 release.
We recommend that you upgrade at the next available opportunity.

This release moves all internal functions from the _timescaleb_internal
schema into the _timescaledb_functions schema. This separates code from
internal data objects and improves security by allowing more restrictive
permissions for the code schema. If you are calling any of those internal
functions you should adjust your code as soon as possible. This version
also includes a compatibility layer that allows calling them in the old
location but that layer will be removed in 2.14.0.

**PostgreSQL 12 support removal announcement**
Following the deprecation announcement for PostgreSQL 12 in TimescaleDB 2.10,
PostgreSQL 12 is not supported starting with TimescaleDB 2.12.
Currently supported PostgreSQL major versions are 13, 14 and 15.
PostgreSQL 16 support will be added with a following TimescaleDB release.

**Features**
* #5137 Insert into index during chunk compression
* #5150 MERGE support on hypertables
* #5515 Make hypertables support replica identity
* #5586 Index scan support during UPDATE/DELETE on compressed hypertables
* #5596 Support for partial aggregations at chunk level
* #5599 Enable ChunkAppend for partially compressed chunks
* #5655 Improve the number of parallel workers for decompression
* #5758 Enable altering job schedule type through `alter_job`
* #5805 Make logrepl markers for (partial) decompressions
* #5809 Relax invalidation threshold table-level lock to row-level when refreshing a Continuous Aggregate
* #5839 Support CAgg names in chunk_detailed_size
* #5852 Make set_chunk_time_interval CAggs aware
* #5868 Allow ALTER TABLE ... REPLICA IDENTITY (FULL|INDEX) on materialized hypertables (continuous aggregates)
* #5875 Add job exit status and runtime to log
* #5909 CREATE INDEX ONLY ON hypertable creates index on chunks

**Bugfixes**
* #5860 Fix interval calculation for hierarchical CAggs
* #5894 Check unique indexes when enabling compression
* #5951 _timescaledb_internal.create_compressed_chunk doesn't account for existing uncompressed rows
* #5988 Move functions to _timescaledb_functions schema
* #5788 Chunk_create must add an existing table or fail
* #5872 Fix duplicates on partially compressed chunk reads
* #5918 Fix crash in COPY from program returning error
* #5990 Place data in first/last function in correct mctx
* #5991 Call eq_func correctly in time_bucket_gapfill
* #6015 Correct row count in EXPLAIN ANALYZE INSERT .. ON CONFLICT output
* #6035 Fix server crash on UPDATE of compressed chunk
* #6044 Fix server crash when using duplicate segmentby column
* #6045 Fix segfault in set_integer_now_func
* #6053 Fix approximate_row_count for CAggs
* #6081 Improve compressed DML datatype handling
* #6084 Propagate parameter changes to decompress child nodes

**Thanks**
* @ajcanterbury for reporting a problem with lateral joins on compressed chunks
* @alexanderlaw for reporting multiple server crashes
* @lukaskirner for reporting a bug with monthly continuous aggregates
* @mrksngl for reporting a bug with unusual user names
* @willsbit for reporting a crash in time_bucket_gapfill
svenklemm added a commit that referenced this pull request Sep 20, 2023
This release contains performance improvements for compressed hypertables
and continuous aggregates and bug fixes since the 2.11.2 release.
We recommend that you upgrade at the next available opportunity.

This release moves all internal functions from the _timescaleb_internal
schema into the _timescaledb_functions schema. This separates code from
internal data objects and improves security by allowing more restrictive
permissions for the code schema. If you are calling any of those internal
functions you should adjust your code as soon as possible. This version
also includes a compatibility layer that allows calling them in the old
location but that layer will be removed in 2.14.0.

**PostgreSQL 12 support removal announcement**
Following the deprecation announcement for PostgreSQL 12 in TimescaleDB 2.10,
PostgreSQL 12 is not supported starting with TimescaleDB 2.12.
Currently supported PostgreSQL major versions are 13, 14 and 15.
PostgreSQL 16 support will be added with a following TimescaleDB release.

**Features**
* #5137 Insert into index during chunk compression
* #5150 MERGE support on hypertables
* #5515 Make hypertables support replica identity
* #5586 Index scan support during UPDATE/DELETE on compressed hypertables
* #5596 Support for partial aggregations at chunk level
* #5599 Enable ChunkAppend for partially compressed chunks
* #5655 Improve the number of parallel workers for decompression
* #5758 Enable altering job schedule type through `alter_job`
* #5805 Make logrepl markers for (partial) decompressions
* #5809 Relax invalidation threshold table-level lock to row-level when refreshing a Continuous Aggregate
* #5839 Support CAgg names in chunk_detailed_size
* #5852 Make set_chunk_time_interval CAggs aware
* #5868 Allow ALTER TABLE ... REPLICA IDENTITY (FULL|INDEX) on materialized hypertables (continuous aggregates)
* #5875 Add job exit status and runtime to log
* #5909 CREATE INDEX ONLY ON hypertable creates index on chunks

**Bugfixes**
* #5860 Fix interval calculation for hierarchical CAggs
* #5894 Check unique indexes when enabling compression
* #5951 _timescaledb_internal.create_compressed_chunk doesn't account for existing uncompressed rows
* #5988 Move functions to _timescaledb_functions schema
* #5788 Chunk_create must add an existing table or fail
* #5872 Fix duplicates on partially compressed chunk reads
* #5918 Fix crash in COPY from program returning error
* #5990 Place data in first/last function in correct mctx
* #5991 Call eq_func correctly in time_bucket_gapfill
* #6015 Correct row count in EXPLAIN ANALYZE INSERT .. ON CONFLICT output
* #6035 Fix server crash on UPDATE of compressed chunk
* #6044 Fix server crash when using duplicate segmentby column
* #6045 Fix segfault in set_integer_now_func
* #6053 Fix approximate_row_count for CAggs
* #6081 Improve compressed DML datatype handling
* #6084 Propagate parameter changes to decompress child nodes

**Thanks**
* @ajcanterbury for reporting a problem with lateral joins on compressed chunks
* @alexanderlaw for reporting multiple server crashes
* @lukaskirner for reporting a bug with monthly continuous aggregates
* @mrksngl for reporting a bug with unusual user names
* @willsbit for reporting a crash in time_bucket_gapfill
svenklemm added a commit that referenced this pull request Sep 20, 2023
This release contains performance improvements for compressed hypertables
and continuous aggregates and bug fixes since the 2.11.2 release.
We recommend that you upgrade at the next available opportunity.

This release moves all internal functions from the _timescaleb_internal
schema into the _timescaledb_functions schema. This separates code from
internal data objects and improves security by allowing more restrictive
permissions for the code schema. If you are calling any of those internal
functions you should adjust your code as soon as possible. This version
also includes a compatibility layer that allows calling them in the old
location but that layer will be removed in 2.14.0.

**PostgreSQL 12 support removal announcement**
Following the deprecation announcement for PostgreSQL 12 in TimescaleDB 2.10,
PostgreSQL 12 is not supported starting with TimescaleDB 2.12.
Currently supported PostgreSQL major versions are 13, 14 and 15.
PostgreSQL 16 support will be added with a following TimescaleDB release.

**Features**
* #5137 Insert into index during chunk compression
* #5150 MERGE support on hypertables
* #5515 Make hypertables support replica identity
* #5586 Index scan support during UPDATE/DELETE on compressed hypertables
* #5596 Support for partial aggregations at chunk level
* #5599 Enable ChunkAppend for partially compressed chunks
* #5655 Improve the number of parallel workers for decompression
* #5758 Enable altering job schedule type through `alter_job`
* #5805 Make logrepl markers for (partial) decompressions
* #5809 Relax invalidation threshold table-level lock to row-level when refreshing a Continuous Aggregate
* #5839 Support CAgg names in chunk_detailed_size
* #5852 Make set_chunk_time_interval CAggs aware
* #5868 Allow ALTER TABLE ... REPLICA IDENTITY (FULL|INDEX) on materialized hypertables (continuous aggregates)
* #5875 Add job exit status and runtime to log
* #5909 CREATE INDEX ONLY ON hypertable creates index on chunks

**Bugfixes**
* #5860 Fix interval calculation for hierarchical CAggs
* #5894 Check unique indexes when enabling compression
* #5951 _timescaledb_internal.create_compressed_chunk doesn't account for existing uncompressed rows
* #5988 Move functions to _timescaledb_functions schema
* #5788 Chunk_create must add an existing table or fail
* #5872 Fix duplicates on partially compressed chunk reads
* #5918 Fix crash in COPY from program returning error
* #5990 Place data in first/last function in correct mctx
* #5991 Call eq_func correctly in time_bucket_gapfill
* #6015 Correct row count in EXPLAIN ANALYZE INSERT .. ON CONFLICT output
* #6035 Fix server crash on UPDATE of compressed chunk
* #6044 Fix server crash when using duplicate segmentby column
* #6045 Fix segfault in set_integer_now_func
* #6053 Fix approximate_row_count for CAggs
* #6081 Improve compressed DML datatype handling
* #6084 Propagate parameter changes to decompress child nodes

**Thanks**
* @ajcanterbury for reporting a problem with lateral joins on compressed chunks
* @alexanderlaw for reporting multiple server crashes
* @lukaskirner for reporting a bug with monthly continuous aggregates
* @mrksngl for reporting a bug with unusual user names
* @willsbit for reporting a crash in time_bucket_gapfill
svenklemm added a commit that referenced this pull request Sep 25, 2023
This release contains performance improvements for compressed hypertables
and continuous aggregates and bug fixes since the 2.11.2 release.
We recommend that you upgrade at the next available opportunity.

This release moves all internal functions from the _timescaleb_internal
schema into the _timescaledb_functions schema. This separates code from
internal data objects and improves security by allowing more restrictive
permissions for the code schema. If you are calling any of those internal
functions you should adjust your code as soon as possible. This version
also includes a compatibility layer that allows calling them in the old
location but that layer will be removed in 2.14.0.

**PostgreSQL 12 support removal announcement**
Following the deprecation announcement for PostgreSQL 12 in TimescaleDB 2.10,
PostgreSQL 12 is not supported starting with TimescaleDB 2.12.
Currently supported PostgreSQL major versions are 13, 14 and 15.
PostgreSQL 16 support will be added with a following TimescaleDB release.

**Features**
* #5137 Insert into index during chunk compression
* #5150 MERGE support on hypertables
* #5515 Make hypertables support replica identity
* #5586 Index scan support during UPDATE/DELETE on compressed hypertables
* #5596 Support for partial aggregations at chunk level
* #5599 Enable ChunkAppend for partially compressed chunks
* #5655 Improve the number of parallel workers for decompression
* #5758 Enable altering job schedule type through `alter_job`
* #5805 Make logrepl markers for (partial) decompressions
* #5809 Relax invalidation threshold table-level lock to row-level when refreshing a Continuous Aggregate
* #5839 Support CAgg names in chunk_detailed_size
* #5852 Make set_chunk_time_interval CAggs aware
* #5868 Allow ALTER TABLE ... REPLICA IDENTITY (FULL|INDEX) on materialized hypertables (continuous aggregates)
* #5875 Add job exit status and runtime to log
* #5909 CREATE INDEX ONLY ON hypertable creates index on chunks

**Bugfixes**
* #5860 Fix interval calculation for hierarchical CAggs
* #5894 Check unique indexes when enabling compression
* #5951 _timescaledb_internal.create_compressed_chunk doesn't account for existing uncompressed rows
* #5988 Move functions to _timescaledb_functions schema
* #5788 Chunk_create must add an existing table or fail
* #5872 Fix duplicates on partially compressed chunk reads
* #5918 Fix crash in COPY from program returning error
* #5990 Place data in first/last function in correct mctx
* #5991 Call eq_func correctly in time_bucket_gapfill
* #6015 Correct row count in EXPLAIN ANALYZE INSERT .. ON CONFLICT output
* #6035 Fix server crash on UPDATE of compressed chunk
* #6044 Fix server crash when using duplicate segmentby column
* #6045 Fix segfault in set_integer_now_func
* #6053 Fix approximate_row_count for CAggs
* #6081 Improve compressed DML datatype handling
* #6084 Propagate parameter changes to decompress child nodes
* #6102 Schedule compression policy more often

**Thanks**
* @ajcanterbury for reporting a problem with lateral joins on compressed chunks
* @alexanderlaw for reporting multiple server crashes
* @lukaskirner for reporting a bug with monthly continuous aggregates
* @mrksngl for reporting a bug with unusual user names
* @willsbit for reporting a crash in time_bucket_gapfill
svenklemm added a commit that referenced this pull request Sep 25, 2023
This release contains performance improvements for compressed hypertables
and continuous aggregates and bug fixes since the 2.11.2 release.
We recommend that you upgrade at the next available opportunity.

This release moves all internal functions from the _timescaleb_internal
schema into the _timescaledb_functions schema. This separates code from
internal data objects and improves security by allowing more restrictive
permissions for the code schema. If you are calling any of those internal
functions you should adjust your code as soon as possible. This version
also includes a compatibility layer that allows calling them in the old
location but that layer will be removed in 2.14.0.

**PostgreSQL 12 support removal announcement**
Following the deprecation announcement for PostgreSQL 12 in TimescaleDB 2.10,
PostgreSQL 12 is not supported starting with TimescaleDB 2.12.
Currently supported PostgreSQL major versions are 13, 14 and 15.
PostgreSQL 16 support will be added with a following TimescaleDB release.

**Features**
* #5137 Insert into index during chunk compression
* #5150 MERGE support on hypertables
* #5515 Make hypertables support replica identity
* #5586 Index scan support during UPDATE/DELETE on compressed hypertables
* #5596 Support for partial aggregations at chunk level
* #5599 Enable ChunkAppend for partially compressed chunks
* #5655 Improve the number of parallel workers for decompression
* #5758 Enable altering job schedule type through `alter_job`
* #5805 Make logrepl markers for (partial) decompressions
* #5809 Relax invalidation threshold table-level lock to row-level when refreshing a Continuous Aggregate
* #5839 Support CAgg names in chunk_detailed_size
* #5852 Make set_chunk_time_interval CAggs aware
* #5868 Allow ALTER TABLE ... REPLICA IDENTITY (FULL|INDEX) on materialized hypertables (continuous aggregates)
* #5875 Add job exit status and runtime to log
* #5909 CREATE INDEX ONLY ON hypertable creates index on chunks

**Bugfixes**
* #5860 Fix interval calculation for hierarchical CAggs
* #5894 Check unique indexes when enabling compression
* #5951 _timescaledb_internal.create_compressed_chunk doesn't account for existing uncompressed rows
* #5988 Move functions to _timescaledb_functions schema
* #5788 Chunk_create must add an existing table or fail
* #5872 Fix duplicates on partially compressed chunk reads
* #5918 Fix crash in COPY from program returning error
* #5990 Place data in first/last function in correct mctx
* #5991 Call eq_func correctly in time_bucket_gapfill
* #6015 Correct row count in EXPLAIN ANALYZE INSERT .. ON CONFLICT output
* #6035 Fix server crash on UPDATE of compressed chunk
* #6044 Fix server crash when using duplicate segmentby column
* #6045 Fix segfault in set_integer_now_func
* #6053 Fix approximate_row_count for CAggs
* #6081 Improve compressed DML datatype handling
* #6084 Propagate parameter changes to decompress child nodes
* #6102 Schedule compression policy more often

**Thanks**
* @ajcanterbury for reporting a problem with lateral joins on compressed chunks
* @alexanderlaw for reporting multiple server crashes
* @lukaskirner for reporting a bug with monthly continuous aggregates
* @mrksngl for reporting a bug with unusual user names
* @willsbit for reporting a crash in time_bucket_gapfill
fabriziomello added a commit to fabriziomello/timescaledb that referenced this pull request Nov 11, 2024
The problem occurs because `currentEventTriggerState->currentCommand`
is not set up since `AlterTableInternal` is called without calling
`EventTriggerAlterTableStart`.

This is because `AlterTableInternal` is called as part of a different
statement, which do not "prepare" for an `AlterTable` correctly.

Fixed it by properly adding the proper start and end calls for the event
trigger on the underlying `AlterTable` to set the replica identity for a
new created chunk introduced by timescale#5515.

Fixes timescale#7406
fabriziomello added a commit to fabriziomello/timescaledb that referenced this pull request Nov 11, 2024
The problem occurs because `currentEventTriggerState->currentCommand`
is not set up since `AlterTableInternal` is called without calling
`EventTriggerAlterTableStart`.

This is because `AlterTableInternal` is called as part of a different
statement, which do not "prepare" for an `AlterTable` correctly.

Fixed it by properly adding the proper start and end calls for the event
trigger on the underlying `AlterTable` to set the replica identity for a
new created chunk introduced by timescale#5515.

Fixes timescale#7406
fabriziomello added a commit to fabriziomello/timescaledb that referenced this pull request Nov 12, 2024
The problem occurs because `currentEventTriggerState->currentCommand`
is not set up since `AlterTableInternal` is called without calling
`EventTriggerAlterTableStart`.

This is because `AlterTableInternal` is called as part of a different
statement, which do not "prepare" for an `AlterTable` correctly.

Fixed it by properly adding the proper start and end calls for the event
trigger on the underlying `AlterTable` to set the replica identity for a
new created chunk introduced by timescale#5515.

Fixes timescale#7406
fabriziomello added a commit to fabriziomello/timescaledb that referenced this pull request Nov 12, 2024
The problem occurs because `currentEventTriggerState->currentCommand`
is not set up since `AlterTableInternal` is called without calling
`EventTriggerAlterTableStart`.

This is because `AlterTableInternal` is called as part of a different
statement, which do not "prepare" for an `AlterTable` correctly.

Fixed it by properly adding the proper start and end calls for the event
trigger on the underlying `AlterTable` to set the replica identity for a
new created chunk introduced by timescale#5515.

Fixes timescale#7406
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement An enhancement to an existing feature for functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants