Merged
Conversation
Member
|
There are empty lines inside the ifs. Other than that, LGTM. |
After setting up peering on a setup that had with `log_connections` and `log_disconnections` enabled I saw some strange logs with empty database names: ``` 2023-08-15 12:51:08.205 CEST [333901] LOG S-0x55a7b1748950: /(nouser)@unix:6432 closing because: successfully sent cancel request (age=0s) 2023-08-15 12:51:08.205 CEST [333901] LOG C-0x55a7b173b300: /(nouser)@127.0.0.1:43772 closing because: successfully sent cancel request (age=0s) ``` This was because the database name for peers databases is all `\0` bytes. This changes our log prefix callback to include the peerid instead like this for peer databases: ``` 2023-08-15 13:04:52.504 CEST [337755] LOG S-0x555bfbf19950: peer-20@unix:6432 closing because: successfully sent cancel request (age=0s) 2023-08-15 13:04:52.504 CEST [337755] LOG C-0x555bfbf0c300: peer-20@127.0.0.1:40792 closing because: successfully sent cancel request (age=0s) ```
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.
After setting up peering on a PgBouncer setup that had with
log_connectionsand
log_disconnectionsenabled I saw some strange logs with empty databasenames:
This was because the database name for peers databases is all
\0bytes. Thischanges our log prefix callback to include the peerid instead like this for
peer databases: