-
Notifications
You must be signed in to change notification settings - Fork 280
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MASTRA-1974] PG Vector Index Update (#1971)
This PR does the following: - adds index rebuilding for ivfflat indexes in order to handle optimization - adds testing suite to compare different dimensions, sizes and k values to determine recall, latency and clustering - adds support for other pg index types
- Loading branch information
Showing
12 changed files
with
1,194 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@mastra/pg': patch | ||
'docs': patch | ||
--- | ||
|
||
Update PG vector to allow for multiple index types |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
services: | ||
db: | ||
image: pgvector/pgvector:pg16 | ||
container_name: 'pg-perf-test-db' | ||
ports: | ||
- '5435:5432' | ||
environment: | ||
POSTGRES_USER: ${POSTGRES_USER:-postgres} | ||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres} | ||
POSTGRES_DB: ${POSTGRES_DB:-mastra} | ||
shm_size: 1gb | ||
command: | ||
- "postgres" | ||
- "-c" | ||
- "shared_buffers=512MB" | ||
- "-c" | ||
- "maintenance_work_mem=1024MB" | ||
- "-c" | ||
- "work_mem=512MB" | ||
tmpfs: | ||
- /var/lib/postgresql/data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.