llama-index-storage-docstore-postgres
llama-index docstore postgres integration
Decision gist · record as of 2026-08-14
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.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a running Postgres instance and valid connection credentials; Python 3.10 or later.
- Low install friction with two runtime dependencies.
- Active maintenance status as of March 2026.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions; suitable for most projects.
last release 2026-03-12 (155 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 147,147 downloads/mo, #11,078 on PyPI
Alternatives
Verify before relying
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")- 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
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 on this page. Verify before relying on it.
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
llama-index-storage-docstore-postgres on PyPI
Before you install
Low install friction with two runtime dependencies. Active maintenance status as of March 2026. No known vulnerabilities.
Requires a running Postgres instance and valid connection credentials; Python 3.10 or later.
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")
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 the current Python release <4.0,>=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesllama-index-corellama-index-storage-kvstore-postgres |
| Maintenance | Actively maintained 155 days since the last release |
| First released | |
| Downloads | 147,147 / month, #11,078 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: llama_index_storage_docstore_postgres-0.5.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “llama-index postgres document store”
- llama-index-storage-docstore-postgresProvides a Postgres-backed document store integration for LlamaIndex,…
- llama-index-storage-kvstore-postgresProvides a PostgreSQL-backed key-value store integration for…
- llama-index-vector-stores-qdrantIntegrates Qdrant vector database with LlamaIndex for storing and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Database packages
psycopg2-binary is a PostgreSQL database adapter for Python that implements the DB API 2.0 specification, enabling Python applications to connect to and query PostgreSQL databases with thread-safe concurrent operations.
Python client library for connecting to and executing commands against Redis key-value stores, supporting both synchronous and asynchronous operations.
Install it if your application needs to interact with Redis; the only prerequisite is a running Redis server instance.
YDB Python SDK is the official client library for connecting to and querying YDB databases from Python applications.
Install it if you need to connect Python applications to YDB databases.
Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.
sqlparse tokenizes SQL text into a tree of statements, clauses, and expressions, and provides functions to split scripts, format queries, and inspect parsed tokens without validating dialect or syntax.
Install it if you need to manipulate, format, or analyze SQL text programmatically.
Provides base adapter protocols and shared functionality that database adapters use to integrate with dbt-core, handling connections, dialect translation, relation caching, and core interface management.
See also llama-index-storage-kvstore-postgres · llama-index-vector-stores-chroma · llama-index-vector-stores-qdrant · llama-index-vector-stores-redis · llama-index-vector-stores-faiss · llama-index-vector-stores-lancedb · llama-index-vector-stores-pinecone · llama-index-vector-stores-postgres · llama-index-vector-stores-milvus · ciris-persist