Skip to content

sql query result and sql_exporter metrics are not equal #747

Closed Answered by burningalchemist
ridvankorkmaz asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @ridvankorkmaz, I was able to partially reproduce the issue. In my case, though, the distribution while using pgx driver matches the pgsql client result. lib/pq seems to prone to that issue and it's possible it wasn't resolved (lib/pq#80 (comment)). But it might not be related to your issue directly, so we need more details.

What I've also learnt on my end is by adding source and context columns we may see how a particular driver adjusts or adds parameters. This is the listing that shows distribution differences between postgresql driver (libpq), pgx and psql client:

pgx(jackc/pgx)                      
                      sourcefile                      |       source       |     …

Replies: 5 comments 6 replies

Comment options

You must be logged in to vote
3 replies
@ridvankorkmaz
Comment options

@ridvankorkmaz
Comment options

@burningalchemist
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@burningalchemist
Comment options

@burningalchemist
Comment options

Comment options

You must be logged in to vote
1 reply
@ridvankorkmaz
Comment options

Answer selected by ridvankorkmaz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants
Converted from issue

This discussion was converted from issue #746 on May 07, 2025 10:33.