Skip to content

[receiver/postgresql] #47768

@sv-splunk

Description

@sv-splunk

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions