Skip to content

fix(schema): avoid rebuilding current indexes - #830

Open
lux-liang wants to merge 1 commit into
janbjorge:mainfrom
lux-liang:fix/offline-index-convergence-828
Open

lux-liang wants to merge 1 commit into
janbjorge:mainfrom
lux-liang:fix/offline-index-convergence-828

Conversation

@lux-liang

Copy link
Copy Markdown

Summary

  • inspect each redefined index in PostgreSQL's catalog before dropping it
  • leave already-current indexes in place when the offline converge script is re-applied
  • still rebuild stale definitions so IF NOT EXISTS cannot preserve an outdated index

Closes #828.

Testing

  • uv sync --all-extras --frozen && uv run ruff check . && uv run ruff format . --check && uv run lint-imports && uv run mypy . && uv run pytest passed (1262 passed, 11 skipped)
  • Added PostgreSQL integration coverage showing current indexes keep their relfilenode and a stale index is restored to the declared definition

Checklist

  • I have read the Contributing Guide
  • I have added or updated tests
  • I have updated documentation if necessary (no documentation change is needed for this behavior fix)

@lux-liang
lux-liang force-pushed the fix/offline-index-convergence-828 branch from cc01020 to e6b679e Compare September 21, 2026 11:11
@janbjorge janbjorge added the bug Something isn't working label Sep 21, 2026
@janbjorge
janbjorge self-requested a review September 21, 2026 11:13
@janbjorge

Copy link
Copy Markdown
Owner

Thanks for submitting, i will review asap.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

offline converge drops and recreates two indexes on every run

2 participants