graphrag icon indicating copy to clipboard operation
graphrag copied to clipboard

Added Postgres pipeline storage

Open AICrafterZheng opened this issue 3 months ago • 0 comments

Description

We need a RAG solution for on-prem deployments. The current pipeline storage options (Cosmos DB and Blob Storage) do not support on-prem environments, and we want to avoid storing the graph in files or memory. To address this, I added support for PostgreSQL as a storage option, providing an additional way to persist graphs.

Related Issues

https://github.com/microsoft/graphrag/discussions/1679

Proposed Changes

  1. Implemented a PostgreSQL storage pipeline, following the same design pattern as cosmosdb_pipeline_storage.py and file_pipeline_storage.py.
  2. Because id serves as the primary key in PostgreSQL tables, it is explicitly included in the graph during initialization.

Checklist

  • [x] I have tested these changes locally.
  • [x] I have reviewed the code changes.
  • [ ] I have updated the documentation (if necessary).
  • [ ] I have added appropriate unit tests (if applicable).

Additional Notes

[Add any additional notes or context that may be helpful for the reviewer(s).]

AICrafterZheng avatar Sep 03 '25 16:09 AICrafterZheng