Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Embedded Postgresql #2134

Merged
merged 4 commits into from
Dec 2, 2024

Conversation

norton120
Copy link
Collaborator

Please describe the purpose of this pull request.
This PR embeds Postgres and PgVector binaries into the runtime of the application. The intent is for this embedded db to replace SQLite/Chroma so the project no longer needs to support 2 different backends.

How to test
Start up and run your tests as usual - if no pg_uri or postgres db params are specified as settings, an embedded PG will be started with the server. The database data is stored at <letta_dir>/pgdata. You can connect directly with an ODBC/JDBC tool (like dbeaver or datagrip or whatever) by using the database uri from the logs, which will look like:
postgresql://postgres:@/postgres?host=/Users/yourname/.letta/pgdata

Have you tested this PR?
When I run the pytest -s tests I get import errors and warnings on main. I get the same with this branch.
QA testing, I have been able to create users and see them populate in the db, but I get 422 errors in the GUI (same as on main).

Related issues or PRs
Related to #2072 which includes pgserver as part of the installable dmg image.

@norton120
Copy link
Collaborator Author

Note the SQLite guts are still in there, we'd want to clean that out in a subsequent PR once this is the path forward.

@sarahwooders sarahwooders changed the base branch from main to pg-binary December 2, 2024 18:54
@sarahwooders sarahwooders merged commit 3ad102a into letta-ai:pg-binary Dec 2, 2024
11 of 27 checks passed
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.

2 participants