Skip to content

Add a collector for pending restarts - #1275

Open
mpldr wants to merge 1 commit into
prometheus-community:masterfrom
mpldr-pulls:pending_restart
Open

mpldr wants to merge 1 commit into
prometheus-community:masterfrom
mpldr-pulls:pending_restart

Conversation

@mpldr

@mpldr mpldr commented Mar 23, 2026

Copy link
Copy Markdown

Produces something along the lines of:

# HELP pg_catalog_pending_restart_info PostgreSQL configuration parameters that are pending a server restart to take effect.
# TYPE pg_catalog_pending_restart_info gauge
pg_catalog_pending_restart_info{pending_value="300",setting="max_connections"} 1

To test:

ALTER SYSTEM SET max_connections = '200'; SELECT pg_reload_conf();

Signed-off-by: Moritz Poldrack <m.poldrack@babiel.com>
@MarcWort

Copy link
Copy Markdown
Contributor

Hi, I just saw this PR, and it is exactly what I need, thank you for creating this @mpldr.

Is there anything blocking this from being reviewed or merged? I’d be happy to help test or make updates if needed.

@MarcWort

MarcWort commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

@SuperQ Could you please take a look at this? It would be much easier if it was merged, rather than me having to maintain a local patch and build for my systems.

@ArthurSens ArthurSens left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, sorry for the delayed review here! The codebase has been heavily refactored a few months back, so the PR will need a big rebase 😬

Also, we need to have proper test coverage before accepting any PRs.

If you don't mind, could you clarify ehat is the intended use case for the pending_value label? pg_settings.setting contains the currently active value, not the value awaiting restart. Are you trying to expose only which settings require a restart, or also the configured value that will take effect afterward?

@ArthurSens

Copy link
Copy Markdown
Contributor

We could probably re-use the existing settings collector instead of creating a new one too 🤔

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.

3 participants