Support for TimescaleDB Indexes
Great project, thanks for creating this! When using pgschema to manage schemas in PostgreSQL with TimescaleDB hypertables, schema migrations fail because pgschema tries to create indexes concurrently. TimescaleDB doesn't support this operation on hypertables.
Error message:
ERROR: hypertables do not support concurrent index creation (SQLSTATE 0A000)
Example
If you have a time-series table like this:
CREATE TABLE table_a (
time TIMESTAMPTZ NOT NULL,
id UUID NOT NULL,
field_a FLOAT8,
field_b TIMESTAMPTZ
);
SELECT create_hypertable('table_a', 'time', if_not_exists => TRUE);
CREATE INDEX IF NOT EXISTS idx_id ON table_a(id);
The migration fails because TimescaleDB doesn't allow concurrent index creation on hypertables. Is there a recommended approach for managing schema migrations with pgschema when using TimescaleDB hypertables?
Timescale stores the metadata in its own timescaledb_information.hypertables
I am not sure whether pgschema would support it natively as it adds more complexity.
Right now, the workaround is to manually edit the generated plan file
Not going to support due to timescale different way to stored metadata for hyper tables