Skip to content

PG: Add recovery prefetch metrics #20464

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

Merged
merged 1 commit into from
Jun 17, 2025
Merged

Conversation

bonnefoa
Copy link
Contributor

@bonnefoa bonnefoa commented Jun 6, 2025

What does this PR do?

Add Postgres recovery prefetch metrics.

Motivation

PG15 introduces asynchronous IO in the recovery process based on posix_fadvise (mostly using POSIX_FADV_WILLNEED). With this, pg_stat_recovery_prefetch was also introduced to provide visibility on how efficient prefetching is. Providing metrics will help to tune maintenance_io_concurrency parameter. For example, io_depth is saturated but the disk still had capacity so increasing maintenance_io_concurrency could help increase recovery throughput.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add the qa/skip-qa label if the PR doesn't need to be tested during QA.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

Copy link

codecov bot commented Jun 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.33%. Comparing base (fc06fa6) to head (f8cbef1).
Report is 35 commits behind head on master.

Additional details and impacted files
Flag Coverage Δ
activemq ?
cassandra ?
confluent_platform ?
hive ?
hivemq ?
hudi ?
ignite ?
jboss_wildfly ?
kafka ?
postgres 93.10% <100.00%> (+3.54%) ⬆️
presto ?
solr ?
tomcat ?
weblogic ?

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bonnefoa bonnefoa force-pushed the bonnefoa/prefetch-stats branch 2 times, most recently from a535f03 to cd091dd Compare June 10, 2025 12:54
@bonnefoa bonnefoa force-pushed the bonnefoa/prefetch-stats branch from cd091dd to f8cbef1 Compare June 11, 2025 06:11
@lu-zhengda lu-zhengda added this pull request to the merge queue Jun 17, 2025
Merged via the queue into master with commit 7caffdb Jun 17, 2025
39 checks passed
@lu-zhengda lu-zhengda deleted the bonnefoa/prefetch-stats branch June 17, 2025 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants