--- id: llama-index-storage-docstore-postgres version: "0.5.0" license: MIT license_treatment: permissive maintenance: active --- # llama-index-storage-docstore-postgres — llama-index docstore postgres integration License: permissive · Maintenance: active · Downloads: 147.1K/mo ## What it is and what it does This package integrates Postgres as a persistent backend for LlamaIndex's document store, allowing you to store and retrieve documents outside of memory. It sits between your LlamaIndex application and a Postgres database, handling the serialization and query logic needed to persist documents across sessions. You use it by configuring it as the docstore backend in a LlamaIndex application. It depends on llama-index-core for the core framework and llama-index-storage-kvstore-postgres for the underlying key-value storage layer that manages the actual Postgres connection and operations. Use it for: - Store documents indexed by LlamaIndex in a persistent Postgres database for long-running applications - Build RAG systems that need to retain document collections across application restarts - Share a common document store across multiple LlamaIndex instances via a shared Postgres backend - Integrate LlamaIndex document management with existing Postgres-based infrastructure ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides a Postgres-backed document store integration for LlamaIndex, enabling persistent storage and retrieval of documents within LlamaIndex applications. Yes, if you are building a LlamaIndex application that needs persistent document storage and already use or plan to use Postgres. Low install friction, active maintenance, MIT license, and no known vulnerabilities make it a straightforward choice for this use case. Not relevant if you don't use LlamaIndex or prefer a different storage backend. ## Install pip install llama-index-storage-docstore-postgres uv add llama-index-storage-docstore-postgres poetry add llama-index-storage-docstore-postgres ## Installing llama-index-storage-docstore-postgres Before you install: Low install friction with two runtime dependencies. Active maintenance status as of March 2026. No known vulnerabilities. License in practice: MIT license permits commercial and private use with minimal restrictions; suitable for most projects. Quickstart: pip install llama-index-storage-docstore-postgres from llama_index.storage.docstore.postgres import PostgresDocumentStore docstore = PostgresDocumentStore.from_uri(connection_string="postgresql://user:password@localhost/dbname") Requires a running Postgres instance and valid connection credentials; Python 3.10 or later. Verify before relying: - Whether this package requires a running Postgres instance or handles connection setup automatically - Performance characteristics and scalability limits for document storage and retrieval - Whether it supports document indexing or only basic storage/retrieval operations ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 147.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags llama-index postgres document store, document storage postgres integration, llama-index docstore backend, postgres vector document persistence, llama-index data persistence layer, llama-index-integration, document-storage, postgres-backend [View on SkillFed](https://skillfed.io/packages/llama-index-storage-docstore-postgres) · [View on PyPI](https://pypi.org/project/llama-index-storage-docstore-postgres/)