Skip to content
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

Stats avg_recv avg_sent change names from SHOW STATS to SHOW TOTALS (documentation issue?) #1247

Open
brandur opened this issue Jan 13, 2025 · 0 comments

Comments

@brandur
Copy link

brandur commented Jan 13, 2025

Hi there, we were looking into exposing more PgBouncer stats to end users, and noticed a bit of an oddity. When using SHOW STATS versus SHOW TOTALS (the latter being stats for all databases), most stats keep the same name, but avg_recv avg_sent seem to change names to become avg_client_bytes and avg_server_bytes instead.

pgbouncer=# SHOW STATS;
-[ RECORD 1 ]----------------- ----------
database                      | pgbouncer
total_server_assignment_count | 0
total_xact_count              | 125983
total_query_count             | 125983
total_received                | 0
total_sent                    | 0
total_xact_time               | 0
total_query_time              | 0
total_wait_time               | 0
avg_server_assignment_count   | 0
avg_xact_count                | 0
avg_query_count               | 0
avg_recv                      | 0
avg_sent                      | 0
avg_xact_time                 | 0
avg_query_time                | 0
avg_wait_time                 | 0
pgbouncer=# SHOW TOTALS;
             name              | value
------------------------------- --------
 total_server_assignment_count |      0
 total_xact_count              | 125982
 total_query_count             | 125982
 total_client_bytes            |      0
 total_server_bytes            |      0
 total_xact_time               |      0
 total_query_time              |      0
 total_wait_time               |      0
 avg_server_assignment_count   |      0
 avg_xact_count                |      0
 avg_query_count               |      0
 avg_client_bytes              |      0
 avg_server_bytes              |      0
 avg_xact_time                 |      0
 avg_query_time                |      0
 avg_wait_time                 |      0
(16 rows)

Not the end of the world, but it may have been better for consistency's sake if these had stayed the same, even if the SHOW TOTALS versions were to be considered a bit better.

It may be too late to change this now, but I think it would at least make sense to document this? If doing a Cmd F on https://www.pgbouncer.org/usage.html, avg_client_bytes and avg_server_bytes don't seem to appear anywhere on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant