llama_index
llama_index copied to clipboard
Add SSL Support to PostgresKVStore
Description
Adds the following options to from_params and from_uri:
- sslmode
- sslcert
- sslkey
- sslrootcert
More info on ssl modes here: https://www.postgresql.org/docs/current/libpq-ssl.html#LIBPQ-SSL-SSLMODE-STATEMENTS
This conditionally requires psycopg3 if using ssl. This is due to an ongoing issue with asyncpg making it unusable for AWS RDS deployments: https://github.com/MagicStack/asyncpg/issues/952
Fixes # N/A
Version Bump?
Did I bump the version in the pyproject.toml
file of the package I am updating? (Except for the llama-index-core
package)
- [x] Yes
- [ ] No
Type of Change
Please delete options that are not relevant.
- [x] New feature (non-breaking change which adds functionality)
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
- [ ] Added new unit/integration tests
- [ ] Added new notebook (that tests end-to-end)
- [x] I stared at the code and made sure it makes sense
Suggested Checklist:
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] I have added Google Colab support for the newly added notebooks.
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [x] I ran
make format; make lint
to appease the lint gods