Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add safe_wal_size and wal_status to replication_slot #1027

Merged

Conversation

MarcWort
Copy link
Contributor

@MarcWort MarcWort commented May 7, 2024

implements #1017

@MarcWort MarcWort force-pushed the mwn-replication-safe-status branch from 5faa9e8 to 4e4a729 Compare May 7, 2024 09:46
Copy link
Contributor

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

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

Thanks, good so far, but needs some changes.

collector/pg_replication_slot.go Outdated Show resolved Hide resolved
collector/pg_replication_slot.go Outdated Show resolved Hide resolved
Signed-off-by: MarcWort <113890636+MarcWort@users.noreply.github.com>
Signed-off-by: MarcWort <113890636+MarcWort@users.noreply.github.com>
@MarcWort MarcWort force-pushed the mwn-replication-safe-status branch from 4e4a729 to 7525c2a Compare May 8, 2024 09:34
@MarcWort MarcWort requested a review from SuperQ May 8, 2024 09:42
Copy link
Contributor

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

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

LGTM

@SuperQ SuperQ merged commit a4ac0e6 into prometheus-community:master May 11, 2024
10 checks passed
@mbanck-ntap
Copy link

safe_wal_size was added to pg_replication_slots in version 13, how is this handled on version 12 servers?

@mbanck-ntap
Copy link

Also, why are the pg_replication_slots_* (not pg_replication_slot_*) metrics from cmd/postgres_exporter/postgres_exporter.go still around, are they not a duplicate of collector/pg_replication_slot.go?

Comment on lines +95 to +96
safe_wal_size,
wal_status
Copy link

Choose a reason for hiding this comment

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

These were added in postgres 13, they are absent in 12 and below, so this will break scraping on Pg 12. See https://www.postgresql.org/docs/12/view-pg-replication-slots.html

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.

None yet

4 participants