Skip to content

Commit

Permalink
Add a special error message when Postgres 14+ is using the older vers…
Browse files Browse the repository at this point in the history
…ion pg_stat_statements
  • Loading branch information
keiko713 committed Nov 10, 2023
1 parent 9a7b89d commit 04a508a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions input/postgres/statements.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ func GetStatements(ctx context.Context, server *state.Server, logger *util.Logge

if globalCollectionOpts.TestRun && foundExtMinorVersion < extMinorVersion {
logger.PrintInfo("pg_stat_statements extension outdated (1.%d installed, 1.%d available). To update run `ALTER EXTENSION pg_stat_statements UPDATE`", foundExtMinorVersion, extMinorVersion)
if extMinorVersion >= 9 {
// with Postgres 14+, there is a known data issue if pgss is using the older version
logger.PrintError("Outdated pg_stat_statements extension is known to cause the incorrect data with query statistics")
}
}

usingStatsHelper := false
Expand Down

0 comments on commit 04a508a

Please sign in to comment.