Skip to content

Conversation

@sghosh23
Copy link
Contributor

@sghosh23 sghosh23 commented Dec 1, 2025

This PR adds PostgreSQL monitoring via postgres_exporter and fixes
connection pool exhaustion issues by increasing max_connections.

Changes:

  • Add postgres_exporter v0.18.1 deployment playbook with offline support
  • Enable collectors: postmaster, stat_statements, stat_checkpointer (PG17)
  • Update libpq5 to 18.1-1 (from PG18, backwards compatible with PG17)
  • Increase max_connections from 20 to 100 to fix hasql-pool timeouts
  • Adjust memory: shared_buffers 256MB→512MB, work_mem 2MB→512kB
  • Add localhost authentication for postgres_exporter (.pgpass, pg_hba.conf)
  • Update worker processes for better parallelism

Fixes:

  • hasql-pool AcquisitionTimeoutUsageError from wire-server services
  • PostgreSQL 17 checkpoint metrics via stat_checkpointer collector
  • postgres_exporter authentication issues

Change type

  • Fix
  • Feature
  • Documentation
  • Security / Upgrade

Basic information

  • THIS CHANGE REQUIRES A DEPLOYMENT PACKAGE RELEASE
  • THIS CHANGE REQUIRES A WIRE-DOCS RELEASE

Testing

  • I ran/applied the changes myself, in a test environment.
  • The CI job attached to this repo will test it for me.

Tracking

  • I added a new entry in an appropriate subdirectory of changelog.d
  • I mentioned this PR in Jira, OR I mentioned the Jira ticket in this PR.
  • I mentioned this PR in one of the issues attached to one of our repositories.

Knowledge Transfer

  • An Asciinema session is attached to the Jira ticket.

Motivation

Objective

Reason

Use case

@sghosh23 sghosh23 requested review from a team and julialongtin as code owners December 1, 2025 12:57
@sghosh23 sghosh23 changed the title Upgrade postgres baniries WPB-22132: Optmize pg cluster for production load and scrape metrics Dec 2, 2025
This PR adds PostgreSQL monitoring via postgres_exporter and fixes
connection pool exhaustion issues by increasing max_connections.

Changes:
- Add postgres_exporter v0.18.1 deployment playbook with offline support
- Enable collectors: postmaster, stat_statements, stat_checkpointer (PG17)
- Update libpq5 to 18.1-1 (from PG18, backwards compatible with PG17)
- Increase max_connections from 20 to 100 to fix hasql-pool timeouts
- Adjust memory: shared_buffers 256MB→512MB, work_mem 2MB→512kB
- Add localhost authentication for postgres_exporter (.pgpass, pg_hba.conf)
- Update worker processes for better parallelism

Fixes:
- hasql-pool AcquisitionTimeoutUsageError from wire-server services
- PostgreSQL 17 checkpoint metrics via stat_checkpointer collector
- postgres_exporter authentication issues
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 8, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants