timescale / timescaledb

An open-source time-series SQL database optimized for fast ingest and complex queries. Packaged as a PostgreSQL extension.
https://www.timescale.com/
Other
17.9k stars 882 forks source link

pg_stat_progress_create_index doesn't report index creation on hypertable #3157

Open maltalex opened 3 years ago

maltalex commented 3 years ago

Relevant system information:

Describe the bug According to the pg 13 documentation, pg_stat_progress_create_index should show index creation progress. However, index creation on hypertables doesn't seem to show up.

I've been creating an index on a large dataset for several hours now and select query from pg_stat_activity; shows several worker threads executing a CREATE INDEX on the hypertable, but pg_stat_progress_create_index doens't show anything. In case it's relevant, I'll mention that the hypertable has compression enabled, and the index is being built on the segment-by columns.

Expected behavior Progress towards index creation should show up in pg_stat_progress_create_index

mkindahl commented 3 years ago

@maltalex Thank you for a very interesting feature request. Not sure how easy it is to implement, but we will investigate.

maltalex commented 3 years ago

@mkindahl Is there a list somewhere of postgres features that aren't supposed to work on hypertables? It's sometimes hard to tell the difference between features and bugs when some standard postgres thing doesn't work as expected on a hypertable.

I would be nice to have a list of known places where the hypertable abstraction is leaking.

RobertAron commented 1 year ago

I would also really like this as well. Especially since CREATE INDEX CONCURRENTLY. Right now if you add an index to a hypertable it will lock and you're not sure when it will become available again.

At least for me...if CONCURRENTLY and this take the same amount of work, I would prefer CONCURRENTLY 😄