Add opt-in schema-scoped PostgreSQL introspection - #2
Draft
Zetazzz wants to merge 2 commits into
Draft
Conversation
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
pg-introspection;PgIntrospectionPluginopt in per PostgreSQL service;When
scopedIntrospectionis unset or false, the existing full-catalog query and default preset are unchanged. A regression test pins the stock SQL to its pre-refactor SHA-256.Service configuration
Scoped-only options without
scopedIntrospectionare rejected instead of being silently ignored. This PR does not add a replacement plugin, change the default preset, or alter PostgreSQL JIT/session settings.Correctness coverage
The real PostgreSQL fixture covers cross-schema enum, domain, composite, range/multirange, function signature, foreign-key and inheritance dependencies; ordinary and
pg_trgmGIN/GiST indexes; explicit extension capability metadata; unrelated schema exclusion; stock/scoped GraphQL SDL equality; runtime execution; and an unapproved-schema negative case.Performance evidence
The same query/closure implementation was measured in constructive#1763 with 10 fresh-process samples per arm and identical JIT-off sessions. On the 65,037-
pg_classfixture:The small fixture showed a 1.9% build-time overhead, so this remains explicitly opt-in. The benchmark controlled JIT externally; this PR intentionally does not manage it.
Validation
pg-introspection: 41 tests passed; build passedgraphile-build-pg: 27 tests passed, including 5 real PostgreSQL scoped cases; build passedgit diff --checkpassed