Repository navigation
Conversation
…robe pg_stat_bgwriter lost checkpoints_timed/checkpoints_req in PostgreSQL 17 (moved to pg_stat_checkpointer as num_timed/num_requested), so the publication-capacity resource probe raised UndefinedColumn on modern PostgreSQL and the capacity-batch contract test failed on main. Detect the server version and read checkpoint counts from the view that actually exposes them on each version.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The publication-capacity resource probe read checkpoint stats from
pg_stat_bgwriter.checkpoints_timed + checkpoints_req, but PostgreSQL 17moved those columns out of
pg_stat_bgwriter(intopg_stat_checkpointerasnum_timed/num_requested). On PostgreSQL 17+ theprobe raised
UndefinedColumn: checkpoints_timed, failing thetest_publication_capacity_batch_contractCI test on main.Fix
Detect the server version via
SHOW server_version_numand read checkpointcounts from the view that exposes them on that version:
pg_stat_checkpointer(num_timed + num_requested)pg_stat_bgwriter(checkpoints_timed + checkpoints_req)Verification
make lintpassestest_publication_capacity_batch_contract(sync + async) passes onPostgreSQL 18
or existing PR.
Base: upstream/main. Head: Ayush7614/knowhere fix/ayush7614/postgres-17-checkpoints-compat