Versions in this module Expand all Collapse all v0 v0.1.0 Aug 19, 2026 Changes in this version + var ErrBuildLeftInvalidIndex = errors.New("the build left an invalid index behind") + var ErrCancelledExternally = errors.New("the build was cancelled from outside the executor before its budget elapsed") + var ErrEmptySequence = errors.New("sequence has no steps") + var ErrIfNotExistsUnsupported = errors.New(...) + var ErrInvariantViolation = errors.New("invariant violation") + var ErrNotConcurrentIndexBuild = errors.New("statement is not a CREATE INDEX CONCURRENTLY") + var ErrPoolTooSmall = errors.New(...) + var ErrPreexistingInvalidIndex = errors.New("an invalid index with this name already exists in the target schema") + var ErrTableNotFound = errors.New("table not found") + var ErrTargetIdentityChanged = errors.New(...) + var ErrUnnamedIndex = errors.New("concurrent index build must name its index") + var ErrUnqualifiedTable = errors.New("concurrent index build must schema-qualify its table") + var ErrUnsupportedPartitionedParent = errors.New("sequence is not supported on a partitioned parent") + var ErrUnsupportedSequenceStep = errors.New("step is not a shape the sequence executor can run safely") + func ExecuteNative(ctx context.Context, pool *pgxpool.Pool, pt preflight.PreflightedTable, ...) error + func ExecuteNativeWithProgress(ctx context.Context, pool *pgxpool.Pool, pt preflight.PreflightedTable, ...) (err error) + type Budget struct + LockTimeout time.Duration + StatementTimeout time.Duration + type BudgetCause int + const CauseLock + const CauseStatement + func (c BudgetCause) String() string + type BudgetError struct + Attempts int + Budget time.Duration + Cause BudgetCause + func (e *BudgetError) Code() Code + func (e *BudgetError) Error() string + type Code string + const CodeBudgetLockExceeded + const CodeBudgetStatementExceeded + const CodeCancelledExternally + const CodeEmptySequence + const CodeExecutionFailed + const CodeIfNotExistsUnsupported + const CodeInvalidIndexOwnLeftover + const CodeInvalidIndexPreexisting + const CodeInvalidIndexUnproven + const CodeInvariantViolation + const CodeNotConcurrentIndexBuild + const CodePoolTooSmall + const CodeTableNotFound + const CodeUnnamedIndex + const CodeUnqualifiedTable + const CodeUnsupportedPartitionedParent + const CodeUnsupportedSequenceStep + func OutcomeCode(err error) Code + type ConcurrentBudget struct + Overall time.Duration + type IndexBuildReport struct + Duration time.Duration + Index string + IndexOID uint32 + Schema string + ServerVersion string + func BuildIndexConcurrently(ctx context.Context, pool *pgxpool.Pool, sql string, b ConcurrentBudget) (IndexBuildReport, error) + func BuildIndexConcurrentlyWithProgress(ctx context.Context, pool *pgxpool.Pool, sql string, b ConcurrentBudget, ...) (rep IndexBuildReport, err error) + type InvalidIndexError struct + Build error + Cleanup error + Index string + Schema string + func (e *InvalidIndexError) Code() Code + func (e *InvalidIndexError) Error() string + func (e *InvalidIndexError) Unwrap() []error + type RetryPolicy struct + InitialBackoff time.Duration + MaxAttempts int + MaxBackoff time.Duration + func DefaultRetryPolicy() RetryPolicy + type SequenceBudget struct + Brief Budget + Concurrent ConcurrentBudget + Validate ValidateBudget + type SequenceReport struct + Steps []StepReport + func RunSequence(ctx context.Context, pool *pgxpool.Pool, pt preflight.PreflightedTable, ...) (SequenceReport, error) + func RunSequenceWithProgress(ctx context.Context, pool *pgxpool.Pool, pt preflight.PreflightedTable, ...) (rep SequenceReport, err error) + type SequenceStepError struct + Err error + Kind StepKind + SQL string + Step int + Total int + func (e *SequenceStepError) Code() Code + func (e *SequenceStepError) Error() string + func (e *SequenceStepError) Unwrap() error + type StepKind string + const StepBrief + const StepConcurrentIndexBuild + const StepValidateConstraint + type StepReport struct + Duration time.Duration + Index *IndexBuildReport + Kind StepKind + SQL string + type ValidateBudget struct + LockTimeout time.Duration + Overall time.Duration