feat: add checks for invalid index - #179
Draft
encima wants to merge 8 commits into
Draft
Conversation
Member
|
You'll need to update This test setup is borked |
Member
|
A few more things: Potential false positives, we should add them to the docs page:
|
Member
Author
|
soedirgo
added a commit
that referenced
this pull request
Aug 4, 2026
The test container ran `./bin/installcheck; cp ... || true`, so the trailing copy decided the container's exit code and every run reported success. A failing suite still produced a green check — see #179, where the new lint's regress test errored with `relation "lint.0030_invalid_index" does not exist` while the `tests` check stayed green. Copy the artifacts out as before, then exit with installcheck's status. Also add bin/check_lints.py, which catches the class of omission behind that failure: a lint that is not loaded by bin/installcheck, not unioned in queries_are_unionable.sql, undocumented, untested, or missing from the mkdocs nav. It runs as a pre-commit hook, so it gates every PR. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Member
|
There's a failing check fyi; these should get easier to surface once #180 is merged |
soedirgo
reviewed
Aug 4, 2026
soedirgo
reviewed
Aug 4, 2026
Co-authored-by: Bobbie Soedirgo <31685197+soedirgo@users.noreply.github.com>
utkarash2991
reviewed
Aug 4, 2026
utkarash2991
reviewed
Aug 4, 2026
utkarash2991
left a comment
Contributor
There was a problem hiding this comment.
Added 1 comments. Rest all looks good to me
soedirgo
added a commit
that referenced
this pull request
Aug 5, 2026
The test container ran `./bin/installcheck; cp ... || true`, so the trailing copy decided the container's exit code and every run reported success. A failing suite still produced a green check — see #179, where the new lint's regress test errored with `relation "lint.0030_invalid_index" does not exist` while the `tests` check stayed green. Copy the artifacts out as before, then exit with installcheck's status. Also add bin/check_lints.py, which catches the class of omission behind that failure: a lint that is not loaded by bin/installcheck, not unioned in queries_are_unionable.sql, undocumented, untested, or missing from the mkdocs nav. It runs as a pre-commit hook, so it gates every PR. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
need help |
…lid_index
Adds two cases to test/sql/0030_invalid_index.sql (expected output regenerated
via pg_regress; full suite passes):
- a leaf partition's invalid index IS flagged with concurrent-reindex advice
(relkind 'i') -- the positive counterpart to the existing partitioned-parent
('I') exclusion test, so the partition handling can't silently over-exclude
- an invalid index in an excluded internal schema (repack) is NOT flagged
utkarash2991
approved these changes
Aug 12, 2026
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.
DO NOT MERGE
What kind of change does this PR introduce?
Feature
What is the current behavior?
Invalid indices not linted
What is the new behavior?
Looks for
indisvalidinpg_indexand alerts on the possible impact (i.e. index not being used by planner)Additional context
Same as other lints, focusing only on schemas that are customer facing