-
Notifications
You must be signed in to change notification settings - Fork 231
[-] fix Invalid command SET lock_timeout...
error, fixes #507
#527
Conversation
4b91d9e
to
ebfb3b4
Compare
Remove command "SET lock_timeout TO '100ms';" when connets to pgbouncer and pgpool DB types.
Added metrics gathering from the pgbouncer 'SHOW POOLS' table
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.
Hey, thanks a lot for your help.
It is usually a good idea to provide with pull requests only atomic changes. It's better here to have two separate PRs: one for bug fixing and one with a new functionality. For example, I'm not sure if we need pgbouncer_pool
table but I'm strongly confident we want a bug fix.
Another advice is to use self descriptive commit messages. There is no need in Update pgwatch2.go
string. We will see that from the commit itself.
It's a good idea to create a new branch in your forked repo and then creating pull request from it and not from master
. Doing so you may allow authors of the target repo make changes. If you want to allow anyone with push access to the upstream repository to make changes to your pull request, select Allow edits from maintainers.
Append 'SET lock_timeout TO '100ms' if DBType is postgres in sql query, else dont't Co-authored-by: Pavlo Golub <pavlo.golub@gmail.com>
@pashagolub Thanks for the advice, I'll keep that in mind next time. I'm new to this ). |
No problem. Good job! I'll merge it as it is since there are no huge changes anyway |
Invalid command SET lock_timeout...
error, fixes #507
Testresult: not passed
Error:
|
@IlyaTsoi I'm sorry, but have you tested the collection of metrics with pgbouncer? It didn't work for me (see above). |
@vitabaks of course! This works well for me. Maybe there is something wrong with the settings? More information required. This issue is discussed here https://github.com/cybertec-postgresql/pgwatch2/issues/550 |
Fixed error "invalid command 'SET lock_timeout TO '100ms'" when connecting to pgbouncer DB type. #507.
It is possible to add pgbouncer tables with the same structure as "show stats" to collect metrics from them. I was add 'show pools' table in tis commit