prometheus-community / prometheus-community/postgres_exporter

A database connexion is open for each databases in the same instance rather than only 1 connection

Open
#723 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
3.6k
Forks
835
Avg merge
2d 4h
Merged PRs (30d)
10

Description

What did you do?

I'm using the exporter to collect all the database in a postgres instance.
The problem is that we have instance with more than 100 databases and the exporter is opening 100 connections.

What did you expect to see?

I expect the exporter to use only 1 connection rather than 1 per database in the instance.

  • System information:

    any

  • postgres_exporter version:

    0.11.1

  • postgres_exporter flags:

    --auto-discover-databases

  • PostgreSQL version:

    any

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the --auto-discover-databases path and how it opens connections while enumerating PostgreSQL databases. Confirm how connections are currently managed, then make the behavior use one connection for the instance and verify that database discovery still works without opening one connection per database.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, postgresql
Domain
databases, observability
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.