Repository navigation
fix: expose subscription tables in information schema - #27942
Conversation
# Conflicts: # pkg/defines/const.go
XuPeng-SH
left a comment
There was a problem hiding this comment.
Deep review of exact head 2b18aac69a17c22f570307a95c5c6cab7c962415: approved.
The prior blocking cancellation race is closed. readStreamResult now re-checks the caller context before reporting clean EOF when the closed stream and caller cancellation are simultaneously ready, and the deterministic 100-iteration regression pins that select race. The check reads proc.Ctx, not the producer child context, so private cleanup cancellation remains a clean lifecycle event.
I also rechecked the current complete diff from the merge base from these angles: cross-account identity and publication/table-scope filtering, private planner admission and clone fallback, v41-v45/v46 bootstrap and upgrade gates, TABLES/COLUMNS type and projection parity, pagination/buffer/output bounds, and cancellation/error/LIMIT/reset/free ownership. The Q1-Q3 lifecycle graph closes: queued/current executor results have one effective close owner, cleanup cancels and drains before joining the producer, and retained work is bounded. I did not find another correctness, authorization, leak, hang, or OOM blocker.
Exact-head required CI is terminal green (success/skip/neutral). The branch is mergeable but currently behind main; v46 is still the next protocol number on current main.
What type of PR is this?
Which issue(s) this PR fixes:
issue #27794
What this PR does / why we need it:
Subscription tables are resolved through the subscriber's local database alias, while their physical table and column catalog rows belong to the publisher account. As a result, readable subscription tables were missing from
information_schema.TABLESandinformation_schema.COLUMNS.This PR:
TABLESandCOLUMNS;table_listas the authoritative scope afterALTER PUBLICATION;TABLESplan to exactly one reachable subscription producer and returnsAUTO_INCREMENT = 0for subscription rows;TABLESorCOLUMNSdefinitions.Validation:
make buildpkg/sql/plan,pkg/sql/colexec/table_function, andpkg/util/sysviewinformation_schema.TABLESplan-shape test: one reachablemo_subscription_tablesproducerpkg/frontendtestsgo vetfor affected packagesgit diff --check