Add live PostgreSQL integration suite and PG18 fixes#4
Merged
Conversation
Add workload metadata, coverage accounting, richer candidate evidence, and reporter regression tests so the workload command explains its scope and confidence more clearly. Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
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.
Summary
analyzeandworkloadWhy
The existing tests were pure Rust and did not verify the CLI against a real PostgreSQL instance. That left several important paths unvalidated:
pg_stat_statementsavailability, visibility, and eviction behaviorRunning the new live suite surfaced real compatibility problems on PostgreSQL 18, so this PR includes the fixes required to make the suite and the product behavior correct against current PostgreSQL releases.
How
Live test harness
testcontainers,assert_cmd,insta, and related dev dependenciestests/support/mod.rsto start PostgreSQL containers, seed databases, clone fresh test databases, run workload setup, and invoke thepostgreatbinaryCOPY ... FROM stdinloads correctlytests/snapshots/New integration scenarios
it_analyze: seededanalyze --format jsonrun with table/index-health findingsit_workload: happy-path workload analysis withpg_stat_statementsit_workload_unavailable: extension missing and installed-but-not-preloaded behaviorit_workload_visibility: limited query-text visibility withoutpg_read_all_statsit_workload_dealloc:pg_stat_statementseviction/deallocation warnings under a constrained statement budgetFixture and product fixes from live verification
tests/_data/2-bloat-and-indexes.sqlpg_stat_checkpointerwith fallback topg_stat_bgwriterindpred IS NOT NULLinstead ofindispartialwhen checking for partial indexesseconds_since_resettodouble precisionin workload metadata collectionpg_stat_statementspreload-error detection to handle the quoted PostgreSQL 18 error textpg_stat_statements.maxvalue in the deallocation test profileCI and docs
README.mdPROGRESS.mdVerification
cargo testcargo clippy --all-targets --all-features -- -D warningsPOSTGREAT_TEST_PG_VERSION=18 cargo test --test it_analyze -- --ignored --test-threads=1POSTGREAT_TEST_PG_VERSION=18 cargo test --test it_workload -- --ignored --test-threads=1POSTGREAT_TEST_PG_VERSION=18 cargo test --test it_workload_unavailable -- --ignored --test-threads=1POSTGREAT_TEST_PG_VERSION=18 cargo test --test it_workload_visibility -- --ignored --test-threads=1POSTGREAT_TEST_PG_VERSION=18 cargo test --test it_workload_dealloc -- --ignored --test-threads=1POSTGREAT_TEST_PG_VERSION=14