fix: PgvectorDocumentStore - use appropriate schema name if dropping index #1277
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related Issues
Proposed Changes:
In pgvector if HNSW index should drop, only index_name was used, but not schema_name. So if there were multiple schemas, the index was not dropped and could not be recreated.
How did you test it?
The check was added directly to the code, so if the index existed and should be dropped, the Error is raised, because I consider it as critical Error.
Notes for the reviewer
I tested this on multiple machines with similar setups, and the behavior was not consistent. On one PC this fix was needed, but on the other PC this fix was not needed, and it was working even without the fix, but I was not able to discover the difference...
But I believe that the fix is correct, and should be applied.
Checklist
fix:
,feat:
,build:
,chore:
,ci:
,docs:
,style:
,refactor:
,perf:
,test:
.