--- id: llama-index-storage-kvstore-postgres version: "0.5.0" license: MIT license_treatment: permissive maintenance: active --- # llama-index-storage-kvstore-postgres — llama-index kvstore postgres integration License: permissive · Maintenance: active · Downloads: 151.0K/mo ## What it is and what it does This package is a storage adapter that connects LlamaIndex to PostgreSQL, allowing you to persist key-value data (such as indexed documents and embeddings) in a relational database instead of memory or local files. It bridges LlamaIndex's kvstore abstraction layer with PostgreSQL, using asyncpg for async operations and psycopg2-binary for synchronous access. Typically used when building LlamaIndex applications that need durable, queryable storage across application restarts or when sharing indexed data across multiple processes. The package handles the schema and connection logic, so you interact with it through LlamaIndex's standard kvstore interface rather than writing SQL directly. Use it for: - Store and retrieve embeddings and indexed documents in PostgreSQL for production LlamaIndex applications - Share indexed data across multiple LlamaIndex workers or services via a central PostgreSQL database - Persist LlamaIndex caches and metadata durably across application restarts without rebuilding indexes - Integrate LlamaIndex with existing PostgreSQL infrastructure in enterprise environments ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides a PostgreSQL-backed key-value store integration for LlamaIndex, enabling persistent storage of indexed data and embeddings using a relational database backend. Yes, if you are building a LlamaIndex application that requires persistent storage and already use or plan to use PostgreSQL. The low install friction, permissive license, and active maintenance make it a straightforward choice for that use case. Not necessary if you are prototyping with in-memory storage or using a different kvstore backend. ## Install pip install llama-index-storage-kvstore-postgres uv add llama-index-storage-kvstore-postgres poetry add llama-index-storage-kvstore-postgres ## Installing llama-index-storage-kvstore-postgres Before you install: Low install friction with three straightforward runtime dependencies. Active maintenance status as of March 2026, though repository metadata is not publicly available for independent verification. License in practice: MIT license permits commercial and private use with minimal restrictions; suitable for most deployment contexts. Quickstart: pip install llama-index-storage-kvstore-postgres from llama_index.storage.kvstore.postgres import PostgresKVStore kvstore = PostgresKVStore.from_connection_string( "postgresql://user:password@localhost/dbname" ) Requires Python 3.10 or later; PostgreSQL server must be accessible at connection time. Verify before relying: - Whether this package is actively maintained by LlamaIndex maintainers or the broader community - Performance characteristics and scalability limits for large-scale kvstore operations - Whether asyncpg and psycopg2-binary can coexist without conflicts in the same environment ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 151.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags llama-index postgres storage, kvstore postgresql integration, llama-index persistent storage, postgres key-value store, llama-index database backend, llama-index-integration, vector-storage [View on SkillFed](https://skillfed.io/packages/llama-index-storage-kvstore-postgres) · [View on PyPI](https://pypi.org/project/llama-index-storage-kvstore-postgres/)