Open soedirgo opened 2 months ago
@soedirgo Thank you for the bug report. Unfortunately, we do not support logical replication of hypertables currently (for implementation reasons). This makes it strange that you can create a hypertable when you have publications for it. Fixing logical replication for hypertables is a significant undertaking, but just preventing the creation of hypertables with publications by throwing an error is probably easier.
Thanks for the response @mkindahl. Agreed that preventing the creation of hypertables on published tables is a lower hanging fruit and prevents the unhappy state.
What type of bug is this?
Unexpected error
What subsystems and features are affected?
Other
What happened?
If
create_hypertable()
is called on a base table after it's added to a publication, its hypertable doesn't get added intopg_publication_tables
. This prevents Postgres from dropping the table from the publication because it'll try to drop the hypertable duringalter publication ... drop table ...
.TimescaleDB version affected
2.16.1
PostgreSQL version used
15.7
What operating system did you use?
Alpine Linux 3.20 arm64
What installation method did you use?
Docker
What platform did you run on?
On prem/Self-hosted
Relevant log output and stack trace
How can we reproduce the bug?
Run the following (tested using Docker on
timescale/timescaledb:latest-pg15
):