Skip to content

Conversation

@TLINDEN
Copy link
Collaborator

@TLINDEN TLINDEN commented Oct 24, 2025

Description

Time and time again we need to check if we are affected by certain vulnerabilities of some postgres extension. To check which extensions are enabled on all logical databases on all postgres instances is tedious manual work.

This PR adds a PLsql function which we use in our default postgres_exporter metrics to have this list easily available all the time.

@TLINDEN TLINDEN requested a review from a team as a code owner October 24, 2025 10:09
@eberlep
Copy link
Contributor

eberlep commented Oct 24, 2025

@TLINDEN the initDBJob is only run on newly created databases and never updated or run for existing databases. With that in mind: What would happen if we roll out the new query.yaml without the plsql function in existing databases?

@TLINDEN
Copy link
Collaborator Author

TLINDEN commented Oct 24, 2025

@TLINDEN the initDBJob is only run on newly created databases and never updated or run for existing databases. With that in mind: What would happen if we roll out the new query.yaml without the plsql function in existing databases?

You're right. The statement would fail because the function wouldn't exist.

@TLINDEN
Copy link
Collaborator Author

TLINDEN commented Nov 4, 2025

Removed the metric. It's enough to have the function available and query all databases once in a while when needed (e.g. if there's an open CVE for an extension). Keep the plsql function though, because it makes it easier to make this query. It has to be added to existing instances manually, but this is no problem, as there's no metric anymore using it.

Base automatically changed from postgreslet-next-release to master November 5, 2025 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants