Repository navigation
Read pg_stat_statements by its installed version, not the server's - #62
Merged
Merged
Conversation
A server upgraded to PostgreSQL 17 without ALTER EXTENSION ... UPDATE keeps pg_stat_statements below 1.11, whose columns are still blk_read_time and blk_write_time. The PG17+ queries then failed with an undefined column.
The update hint only lived at the bottom of the pg_stat_statements page. The overview header now says when a newer version is available and links to it.
defkode
added a commit
that referenced
this pull request
Oct 8, 2026
pg_stat_statements is read by its installed version, not the server's: a server upgraded to PostgreSQL 17+ without ALTER EXTENSION ... UPDATE no longer crashes the queries pages (#62). The overview header says when a newer pg_stat_statements is available, linking to the update command (#62). Co-Authored-By: Claude Opus 5.5 <[email protected]>
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: On a server upgraded to PostgreSQL 17+ without running
ALTER EXTENSION pg_stat_statements UPDATE, the queries pages crash withcolumn "shared_blk_read_time" does not exist. The extension is still below 1.11, so it has the old column names, but pg_peek picked the SQL by server version.Change:
pg_stat_statements 1.10 (1.11 available)), linking to the update command on the pg_stat_statements page. Before, that hint was only at the bottom of that page.