-
Notifications
You must be signed in to change notification settings - Fork 893
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
Fix ANALYZE crash with custom types #3745
Conversation
edc8f8d
to
af7f6ea
Compare
Codecov Report
@@ Coverage Diff @@
## master #3745 +/- ##
==========================================
- Coverage 90.29% 90.29% -0.01%
==========================================
Files 213 213
Lines 37655 37654 -1
==========================================
- Hits 34001 33999 -2
- Misses 3654 3655 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add changelog entry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to add a test by creating a custom type (CREATE TYPE) and then use it in a distributed hypertable that we ANALYZE?
No. For this to happen, we need a custom STATISTIC type, not just custom type and that can happen only via PostGIS or other external components. |
Extensions like PostGIS introduce custom datatypes for columns. They also have custom statistics for such custom types. We already state in our comments that stats for custom types are not supported but it was never tested. Fix that now. Fixes timescale#3733
af7f6ea
to
e4a174e
Compare
Done. Thanks |
I guess we could introduce such a type in the C part of testing, unless it is unnecessary complicated |
Isn't it possible to just alias an existing type and reference its stats function? Similar to this: timescaledb/test/sql/custom_type.sql Line 7 in 0fecefd
|
The only way to do this would be in C code to introduce a new stats kind entry with value more than 99 or 1000 or something. Not sure it's worth the hassle. |
Extensions like PostGIS introduce custom datatypes for columns. They
also have custom statistics for such custom types. We already state in
our comments that stats for custom types are not supported but it was
never tested. Fix that now.
Fixes #3733