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
16.83k stars 852 forks source link

add "is_reference" boolean in _timescaledb_catalog.hypertable #5141

Closed nikkhils closed 1 month ago

nikkhils commented 1 year ago

As per #5140 we need to know that a specific distributed hypertable is a "REFERENCE TABLE" implementation. Add a "is_reference" boolean field for that. Also make changes to the hypertable views in all relevant locations to show that it's a reference table.

While we are doing this. Also add an additional "is_distributed" boolean field because right now it's derived indirectly by checking "replication_factor > 0" in many views, etc. So this will be helping remove tech-debt as well.

We could have considered using of bit flags in on single column and adding bits for REF/DISTRIBUTED etc. but we might not save a lot of space due to alignment padding. A boolean column uses 1 byte. Effectively, we can fit four or more boolean columns for one integer column. This also keeps the code simple.

svenklemm commented 1 month ago

multinode has been removed