Repository navigation
Conversation
The attach flow built the table's indexes with no tracker, so a host could neither show nor stop a build that can run for hours. The leaf refusals it reuses now say "table" for a table not yet attached.
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.
An online
ATTACH PARTITIONnow reports its index builds to the run's progress tracker, so a host can watch them and stop one withCancelBuild.Why
Before attaching a table as a partition, pg-sprite builds on it every index the parent has, concurrently, which on a large table can take hours. Those builds ran without the run's progress tracker, so a host such as SchemaBot showed nothing while they ran and had no way to stop one short of killing the session, unlike every other concurrent index build pg-sprite runs.
What
ensureAttachIndexes, which passes them to both build paths: a plain index, and a key index through the leaf key step (ensureAttachKeyIndex,ensureLeafKeyExcept,buildLeafKeyIndex). Each build is announced asconcurrent-index-buildwith its statement before it starts. The partitioned key build still passes nil, as before.partitionNode.noun()); the partitioned key build's wording is unchanged.main(attach-partition-index-unsupported, permanent;attach-partition-not-ready, retryable).schemabot-integration.mdgains rows for a cancelled build (invalid-index-own-leftover, rerun gets past it) and for the key step's refusals reached from an attach (permanent), and no longer says hosts see no progress.CancelBuildstops it withinvalid-index-own-leftover, the table stays unattached, and a rerun attaches. Plain and key variants, on PG 14 and 16; a flow-level test checks the unsupported and conflict codes.Before / after
The same attach of a large
events_2026table whose parent has a primary key, while an operator wants to stop the build.