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

[Enhancement]: Improve messages when picking default compression settings #7175

Open
erimatnor opened this issue Aug 1, 2024 · 3 comments
Open
Labels
bug enhancement An enhancement to an existing feature for functionality

Comments

@erimatnor
Copy link
Contributor

erimatnor commented Aug 1, 2024

What type of enhancement is this?

User experience

What subsystems and features will be improved?

Compression

What does the enhancement do?

The functionality to pick default compression settings when none are given can give a bit strange output:

postgres=# create table mytable (time timestamptz, device int, temp float);
CREATE TABLE
postgres=# select create_hypertable('mytable', 'time');
NOTICE:  adding not-null constraint to column "time"
DETAIL:  Dimensions cannot have NULL values.
  create_hypertable   
----------------------
 (6,public,mytable,t)
(1 row)

postgres=# alter table mytable set (timescaledb.compress);
WARNING:  there was some uncertainty picking the default segment by for the hypertable: You do not have any indexes on columns that can be used for segment_by and thus we are not using segment_by for compression. Please make sure you are not missing any indexes
NOTICE:  default segment by for hypertable "mytable" is set to ""
NOTICE:  default order by for hypertable "mytable" is set to ""time" DESC"
ALTER TABLE

In the above example, the system tells you that there is a segmentby column set to the empty string. Does that mean there is no segmentby or that there is an error in the output?

Also, double quoting happens in ""time" DESC" it would be cleaner to just print '"time" DESC' or "time DESC".

Apart from this, the multiple messages output is a bit jarring and overloads the user with info. I think it would be better to collect this info into one string and output one message.

Implementation challenges

None.

@erimatnor erimatnor added enhancement An enhancement to an existing feature for functionality bug labels Aug 1, 2024
@jrimek-prgs
Copy link

is there any workaround how to suppress the warning?

@erimatnor
Copy link
Contributor Author

is there any workaround how to suppress the warning?

Not currently. Perhaps it is something we can consider in the future.

@jflambert
Copy link

I just logged a similar bug #7663

I can confirm that the double-quoting observed here is no longer present in v2.18.0 (so perhaps we could close this one)

However I am also facing confusion regarding the segmentby/orderby WARNINGs, which I'm not sure if I should be heeding or ignoring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug enhancement An enhancement to an existing feature for functionality
Projects
None yet
Development

No branches or pull requests

3 participants