Skip to content

Commit 515a1c4

Browse files
committed
fix(db): recover an interrupted build of the keyword projection document index on replay
1 parent a3c986c commit 515a1c4

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎packages/db/migrations/0373_keyword_tin_document_index.sql‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@
22
-- document id; with no index on that column every ACL change scanned the whole projection.
33
COMMIT;--> statement-breakpoint
44
SET lock_timeout = 0;--> statement-breakpoint
5+
-- migration-safe: replay replaces only this new index to recover an interrupted concurrent build; existing indexes remain available.
6+
DROP INDEX CONCURRENTLY IF EXISTS "embedding_keyword_tin_document_idx";--> statement-breakpoint
57
CREATE INDEX CONCURRENTLY IF NOT EXISTS "embedding_keyword_tin_document_idx" ON "embedding_keyword_tin" USING btree ("document_id");--> statement-breakpoint
68
SET lock_timeout = '5s';

0 commit comments

Comments
 (0)