Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hypertable ID serial increments although no table created #72

Closed
erimatnor opened this issue May 31, 2017 · 2 comments
Closed

Hypertable ID serial increments although no table created #72

erimatnor opened this issue May 31, 2017 · 2 comments

Comments

@erimatnor
Copy link
Contributor

If create_hypertable() is run on an existing hypertable, the hypertable serial ID is still incremented. Although not strictly a bug, it is something we might want to avoid in order to not eat a lot of IDs. For instance, one could first check for an existing hypertable before incrementing the ID.

@dianasaur323
Copy link
Contributor

@erimatnor is this still an issue that you think we should address? If not, we can close out. If yes, what would the priority of this be in your mind?

@svenklemm
Copy link
Member

This seems fixed in recent versions.

dev=# select  * from _timescaledb_catalog.hypertable_id_seq;
 last_value | log_cnt | is_called
------------+---------+-----------
          9 |      32 | t
(1 row)

Time: 1.458 ms
dev=# select create_hypertable('metrics','time');
ERROR:  TS110: table "metrics" is already a hypertable
LOCATION:  ts_hypertable_create_from_info, hypertable.c:2006
Time: 12.065 ms
dev=# select  * from _timescaledb_catalog.hypertable_id_seq;
 last_value | log_cnt | is_called
------------+---------+-----------
          9 |      32 | t
(1 row)

syvb pushed a commit to syvb/timescaledb that referenced this issue Sep 8, 2022
72: Clean default JSON serialization r=JLockerman a=JLockerman

This PR updates `flat_serialize` to a newer version that allow annotating fields with attributes based on whether they are fixed or variable width. This allows us to use this functionality to annotate all our types with their field's deserializer and removes that boilerplate.

Co-authored-by: Joshua Lockerman <josh@timescale.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants