expaso / hassos-addon-timescaledb

A HomeAssistant add-on containing PostgreSQL, psql client and TimeScaleDb
Apache License 2.0
51 stars 14 forks source link

Fixed an issue whereby the upgrade would fail when the scripts from TimescaleDb-extras are installed. #37

Closed expaso closed 1 year ago

expaso commented 1 year ago

See: https://github.com/timescale/timescaledb-extras/issues/34

When these scripts are installed, the upgrade of the timescale extension fails with:

cannot drop _timescaledb_catalog.dimension_slice because it depends on function public.get_dimension_details(regclass) Same error for the views: public.chunks_tstz and public.chunks_ts

This is rather nasty for me, since I don't know if users have timescaledb-extra's installed or not, and I do unsupervised upgrade.

For now, I drop these function if they exist before upgrade, but I found it worth mentioning because there may be more elegant solutions.