This is an automated backport of #7434: Fix segfault when setting chunk replica identity.
The original issue is #7406.
This PR will be merged automatically after all the relevant CI checks pass. If this fix should not be backported, or will be backported manually, just close this PR. You can use the backport branch to add your changes, it won't be modified automatically anymore.
The segfault happened executing AlterTableInternal for setting the REPLICA IDENTITY during chunk creation (introduced by https://github.com/timescale/timescaledb/issues/5512) that is dispatched by a trigger invoked by a DDL statement.
Fixed it by using our internal ts_alter_table_with_event_trigger handler function to setup the event trigger context.
This is an automated backport of #7434: Fix segfault when setting chunk replica identity. The original issue is #7406. This PR will be merged automatically after all the relevant CI checks pass. If this fix should not be backported, or will be backported manually, just close this PR. You can use the backport branch to add your changes, it won't be modified automatically anymore.
For more details, please see the documentation
Original description
Fix segfault when setting chunk replica identity
The segfault happened executing
AlterTableInternal
for setting the REPLICA IDENTITY during chunk creation (introduced by https://github.com/timescale/timescaledb/issues/5512) that is dispatched by a trigger invoked by a DDL statement.Fixed it by using our internal
ts_alter_table_with_event_trigger
handler function to setup the event trigger context.Fixes
#7406