Convert all stats from INT8 -> NUMERIC(20, 0)#401
Closed
stanhu wants to merge 3 commits intopgbouncer:masterfrom
Closed
Convert all stats from INT8 -> NUMERIC(20, 0)#401stanhu wants to merge 3 commits intopgbouncer:masterfrom
stanhu wants to merge 3 commits intopgbouncer:masterfrom
Conversation
3e539dd to
03ed622
Compare
809e635 to
2f96bef
Compare
Internally these statistics are stored as unsigned 64-bit values, but the PostgreSQL INT8 types can only express signed 64-bit values. Convert all the stats to NUMERIC(20, 0) to avoid losing data. Closes pgbouncer#360
688f4ea to
9136559
Compare
Improve documentation for NUMERIC typmod
9136559 to
e8c1aed
Compare
Author
|
@petere Would you mind reviewing? |
petere
reviewed
Aug 9, 2019
Member
petere
left a comment
There was a problem hiding this comment.
Looks pretty good at first glance. I'll work on integrating this.
Author
|
@petere Friendly ping. We got bit by recently by a problem with not having metrics for a subset of our PgBouncer hosts. Can we look into rolling this in soon? |
Member
|
I want to go through all the admin and stats commands and check for similar data type mismatch/overflow problems. I think there are a few more. It will need a bit more time. |
petere
added a commit
to petere/pgbouncer
that referenced
this pull request
Sep 9, 2019
Internally, most statistiscs are kept as uint64_t. Sending those with a row descriptor that claims they are bigint can lead to problems if uint64_t values can overflow the signed 64-bit integer range. Then a client library that wants to convert the value to its locally appropriate signed 64-bit integer type would run into errors. based on patch by @stanhu fixes pgbouncer#360 pgbouncer#401
Member
|
a fix has been committed |
Author
|
@petere Thanks, could you cut a new release for PgBouncer? |
Member
|
yes :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Internally these statistics are stored as unsigned 64-bit values,
but the PostgreSQL INT8 types can only express signed 64-bit values.
Convert all the stats to NUMERIC(20, 0) to avoid losing data.
Closes #360