-
Notifications
You must be signed in to change notification settings - Fork 848
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
Internal Server Error when loading Explorer tab #5723
Conversation
|
@nikkhils, @RafiaSabih: please review this pull request.
|
Codecov Report
@@ Coverage Diff @@
## main #5723 +/- ##
==========================================
- Coverage 87.85% 87.79% -0.07%
==========================================
Files 234 234
Lines 54987 54982 -5
Branches 12114 12113 -1
==========================================
- Hits 48310 48269 -41
- Misses 4852 4855 +3
- Partials 1825 1858 +33 see 21 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
sql/size_utils.sql
Outdated
_timescaledb_catalog.hypertable ht | ||
JOIN pg_class c ON relname = ht.table_name AND c.relkind = 'r' | ||
JOIN pg_namespace n ON n.oid = c.relnamespace | ||
AND n.nspname = schema_name_in |
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.
AND n.nspname = schema_name_in | |
AND n.nspname = ht.schema_name |
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.
Done.
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.
Left just a minor suggestion but approved anyway. Thanks for working on this!
This is with reference to a weird scenarios where chunk table entry exist in timescaledb catalog but it does not exist in PG catalog. The stale entry blocks executing hypertable_size function on the hypertable. The changes in this patch are related to improvements suggested for hypertable_size function which involves: 1. Locking the hypertable in ACCESS SHARE mode in function hypertable_size to avoid risk of chunks being dropped by another concurrent process. 2. Joining the hypertable and inherited chunk tables with "pg_class" to make sure that a stale table without an entry is pg_catalog is not included as part of hypertable size calculation. 3. An additional filter (schema_name) is required on pg_class to avoid calculating size of multiple hypertables with same in different schema. NOTE: With this change calling hypertable_size function will require select privilege on the table.
This is with reference to a weird scenarios where chunk table entry exist in timescaledb catalog but it does not exist in PG catalog. The stale entry blocks executing hypertable_size function on the hypertable.
The changes in this patch are related to improvements suggested for hypertable_size function which involves:
NOTE: With this change calling hypertable_size function will require select privilege on the table.
Closes https://github.com/timescale/Support-Dev-Collab/issues/995
Disable-check: force-changelog-file