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

Metric pg_stat_user_functions is not working #122

Closed
vsuchard opened this issue Jan 17, 2024 · 1 comment
Closed

Metric pg_stat_user_functions is not working #122

vsuchard opened this issue Jan 17, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@vsuchard
Copy link

Describe the bug

Query for the metric pg_stat_user_functions not working , it is selecting column rows which does not exist for table pg_stat_user_functions, it keeps error in postgresql log.

To Reproduce
SELECT
funcname,
rows,
self_time,
total_time
FROM pg_stat_user_functions;

Version
0.4.0 / 0.5.0

PostgreSQL

all

libev

N/A

OpenSSL

N/A

OS

N/A

Configuration

N/A

  • pgexporter.conf

Prometheus

no output

  • Dump

Debug logs

2024-01-17 17:59:42.654 CET ::1 pgexporter [3769688] [postgres]ERROR: column "rows" does not exist at character 18
2024-01-17 17:59:42.654 CET ::1 pgexporter [3769688] [postgres]STATEMENT: SELECT funcname, rows, self_time, total_time FROM pg_stat_user_functions;

Tip

replace rows with calls within the select
postgres=# \d pg_stat_user_functions
View "pg_catalog.pg_stat_user_functions"
Column | Type | Collation | Nullable | Default
------------+------------------+-----------+----------+---------
funcid | oid | | |
schemaname | name | | |
funcname | name | | |
calls | bigint | | |
total_time | double precision | | |
self_time | double precision | | |

SELECT
funcname,
calls,
self_time,
total_time
FROM pg_stat_user_functions;

Use ``` before and after the text to keep the output as is.

@jesperpedersen
Copy link
Contributor

Thanks for the report !

Patch has been merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants