-
Notifications
You must be signed in to change notification settings - Fork 23
Add sql error code hook #698
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
Conversation
MMeent
left a comment
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.
Couldn't we use elog.h's emit_log_hook to collect error codes?
I'm fairly sure this isn't always called, and so this will skip e.g. XX000/ERRCODE_INTERNAL_ERROR.
While skipping those may be OK for the current use case, it's likely to cause issues down the line.
|
Please remove the pull request number in the commit message. |
ba0eb9b to
21cd295
Compare
|
Ooops. On a series of rebasing branches for CI to run, I realized after the fact that this branch had received other commits. Now I can't fetch them from github anymore. We've lost some changes. |
I checked and for this corruption errors, this errcode function is always called. Let's merge this? Suhas PR depends on this change. @thesuhas |
As shared in his PR and as I mentioned above, while that PR does depend on this PR (because it uses this new hook) it should instead use the existing |
Yes. Let's merge this in and get rid of this hook once we get into one repo. WDYT? |
|
From discussion, we can close this one and use |
## Problem We don't have visibility into data/index corruption. ## Summary of changes Add data/index corruptions metrics. PG calls elog ERROR errcode to emit these corruption errors. PG Changes: neondatabase/postgres#698
No description provided.