Skip to content

Commit

Permalink
Create index concurrently
Browse files Browse the repository at this point in the history
  • Loading branch information
hinthornw committed Dec 5, 2024
1 parent 0f0e31d commit 9c3fadc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/checkpoint-postgres/langgraph/store/postgres/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class Migration(NamedTuple):
""",
"""
-- For faster lookups by prefix
CREATE INDEX IF NOT EXISTS store_prefix_idx ON store USING btree (prefix text_pattern_ops);
CREATE INDEX CONCURRENTLY IF NOT EXISTS store_prefix_idx ON store USING btree (prefix text_pattern_ops);
""",
]

Expand Down Expand Up @@ -107,7 +107,7 @@ class Migration(NamedTuple):
),
Migration(
"""
CREATE INDEX IF NOT EXISTS store_vectors_embedding_idx ON store_vectors
CREATE INDEX CONCURRENTLYIF NOT EXISTS store_vectors_embedding_idx ON store_vectors
USING %(index_type)s (embedding %(ops)s)%(index_params)s;
""",
condition=lambda store: bool(
Expand Down

0 comments on commit 9c3fadc

Please sign in to comment.