skillfed

llama-index-storage-docstore-postgres

llama-index docstore postgres integration

llama-index-storage-docstore-postgres v0.5.0 147.1K downloads/30d#11,078 on PyPI
Permissive license MIT Active released

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

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

llama-index-storage-docstore-postgres on PyPI

pip

pip install llama-index-storage-docstore-postgres

uv

uv add llama-index-storage-docstore-postgres

poetry

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 the current Python release (<4.0,>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 2 — llama-index-core, llama-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

llama-index postgres document storedocument storage postgres integrationllama-index docstore backendpostgres vector document persistencellama-index data persistence layer
llama-index-integrationdocument-storagepostgres-backend

More Database packages

psycopg2-binary

psycopg2-binary is a PostgreSQL database…

copyleft · top 1,000 on PyPI

redis

Python client library for connecting to and…

permissive · top 1,000 on PyPI

ydb

YDB Python SDK is the official client library…

permissive · top 1,000 on PyPI

snowflake-connector-python

Connects Python applications to Snowflake data…

permissive · top 1,000 on PyPI

sqlparse

sqlparse tokenizes SQL text into a tree of…

permissive · top 1,000 on PyPI

dbt-adapters

Provides base adapter protocols and shared…

permissive · top 1,000 on PyPI

llama-index-storage-kvstore-postgres

Provides a PostgreSQL-backed key-value store…

permissive · top 15,000 on PyPI

llama-index-vector-stores-chroma

Integrates Chroma vector database with…

permissive · top 15,000 on PyPI

llama-index-vector-stores-qdrant

Integrates Qdrant vector database with…

permissive · top 15,000 on PyPI

llama-index-vector-stores-redis

Integrates Redis as a vector store backend for…

permissive · top 15,000 on PyPI

llama-index-vector-stores-faiss

Integrates FAISS vector storage with LlamaIndex…

permissive · top 15,000 on PyPI

llama-index-vector-stores-lancedb

Integrates LanceDB as a vector store backend…

permissive · top 15,000 on PyPI

llama-index-vector-stores-pinecone

Integrates Pinecone vector database with…

permissive · top 15,000 on PyPI

llama-index-vector-stores-postgres

Integrates PostgreSQL with pgvector extension…

permissive · top 15,000 on PyPI

llama-index-vector-stores-milvus

Integrates the Milvus vector database with…

permissive · top 15,000 on PyPI

ciris-persist

CIRISPersist provides unified, versioned…

agpl · top 15,000 on PyPI