gleu/pgstats

pgBouncer data seem to be bad

Closed this issue · 3 comments

Quick run:

=$ ./pgstat -s pbpools -d pgbouncer
---- client -----  ---------------- server ----------------  -- misc --
 active  waiting    active    idle    used  tested   login    maxwait
     89        0         2     182       0       2       0         0
      0        0         0  18446744073709551600       0  18446744073709551614       0         0
      0        0         0  18446744073709551601       0       0       0         0
      0        0         0  18446744073709551593       0       0       0         0

Not sure why this happened. We have quite a lot of client and server connections, but not that many.

The problem might be because we have one more column returned by "show pools" - custom patch on pgbouncer. The value is pooling mode, which can be set by pool.

gleu commented

That could well be. I also had an issue with metrics going up and down. That one should be fixed in the latest code. Maybe check the latest code?

It no longer shows these huge numbers, but shows quite a lot of "negative" counts:

=$ ./pgstat -s pbpools -d pgbouncer
---- client -----  ---------------- server ----------------  -- misc --
 active  waiting    active    idle    used  tested   login    maxwait
     87        0         1      85       0       0       0         0
      0        0        -1       1       0       0       0         0
      0        0         2      -2       0       0       0         0
      0        0        -2       2       0       0       0         0
      0        0         6      -6       0       0       0         0
      0        0        -6       6       0       0       0         0