Overview
PostgresStorage provides a PostgreSQL-based storage backend. Ideal for production deployments, multi-node systems, and applications requiring ACID compliance.
Install
Install the PostgreSQL storage optional dependency group:
Basic Usage
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
db_url | str | None | None | PostgreSQL connection URL |
db_engine | Engine | None | None | Pre-configured SQLAlchemy Engine |
db_schema | str | None | "public" | PostgreSQL schema to use |
session_table | str | None | "upsonic_sessions" | Session table name |
user_memory_table | str | None | "upsonic_user_memories" | User memory table name |
create_schema | bool | True | Auto-create schema if not exists |
id | str | None | auto-generated | Storage instance ID |
Storage Type
PostgresStorage is a synchronous storage implementation using SQLAlchemy with psycopg2 driver.
