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

Add ability to specify Postgres connection credentials #564

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

michaelbautin
Copy link

@michaelbautin michaelbautin commented Dec 27, 2024

Allow specifying PostgreSQL credentials when running against an external instance of PostgreSQL not managed by the benchmark. Also allow avoiding an attempt to start PostgreSQL service, because it might be managed in a different way.

Fixes: #563

@maumueller
Copy link
Collaborator

Thanks for your contribution, @michaelbautin. I'm a bit skeptical about the proposed solution, because it makes this very pronounced from an API point of view, while it only applies to a very small subset of the algorithms.

Can you achieve the same functionality by specifying these credentials in the config file https://github.com/erikbern/ann-benchmarks/blob/main/ann_benchmarks/algorithms/pgvector/config.yml? If I remember correctly, you can provide it in the base_args entry which is propagated to the constructor of the class.

@michaelbautin michaelbautin changed the title Add ability to specify database connection credentials on the command line Add ability to specify Postgres connection credentials Jan 18, 2025
@michaelbautin
Copy link
Author

@maumueller Thank you for your feedback. I've reworked the PR to avoid introducing generic command-line parameters, and instead made it controllable by Postgres-specific environment variables. Also I've added automatic pgvector extension creation and a way to avoid attempting to start PostgreSQL service if it is managed in a different way.

Cc @erikbern

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.

Allow specifying database server connection credentials
2 participants