Component(s)
receiver/postgresql
Describe the issue you're reporting
Customers running the postgresqlreceiver against PostgreSQL instances observe repeated warnings flooding their journal:
postgresqlreceiver@v0.147.0/client.go warn problems encountered getting log rows
"error": "column \"datname\": NULL value" (×100+)
The root cause is that pg_stat_activity and the pg_stat_statements LEFT JOIN pg_database join both legitimately return NULL for datname when:
- The backend process is not connected to a specific database (WAL sender/receiver, autovacuum launcher, checkpointer, bgwriter, walwriter, startup/recovery process).
- A pg_stat_statements row references a dbid that no longer exists in pg_database (dropped database; stats not yet reset).
Also there are similar errors with rolname being null.
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.
Component(s)
receiver/postgresql
Describe the issue you're reporting
Customers running the postgresqlreceiver against PostgreSQL instances observe repeated warnings flooding their journal:
The root cause is that pg_stat_activity and the pg_stat_statements LEFT JOIN pg_database join both legitimately return NULL for datname when:
Also there are similar errors with
rolnamebeing null.Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding
+1orme too, to help us triage it. Learn more here.