Skip to content

Conversation

@0xrushi
Copy link

@0xrushi 0xrushi commented May 9, 2025

Possible solution for #165

Added thread locks to prevent multi table creation, optionally we can also pass extend_existing = True if required.

vector_store = PGVector(
    embeddings=OpenAIEmbeddings(),
    collection_name="test_collection",
    connection=connection_string,
    extend_existing=True,
)

self._engine: Optional[Engine] = None
self._async_engine: Optional[AsyncEngine] = None
self._async_init = False
self.extend_existing = extend_existing
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be a private variable self._extend_existing

@t-ionut
Copy link

t-ionut commented Sep 8, 2025

@MartinGotelli I've just encountered this exact issue in my work and I'm happy to see @0xrushi has a fix in this PR.

Any chance of getting this merged soon?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants