Database
/
PostgreSQL Storage

PostgreSQL Storage

PostgreSQL offers enterprise-grade reliability, concurrent access, and scalability. It's the recommended choice for production applications requiring high availability and performance.

Overview

PostgreSQL is a powerful, open-source object-relational database system known for its robustness, extensibility, and standards compliance. Open LangGraph Server uses PostgreSQL for enterprise-grade data persistence.

Characteristics

  • 🏢 Enterprise-grade - Full ACID compliance and reliability
  • 🔄 Concurrent access - Multiple simultaneous connections
  • 📈 Scalable - Handles high-throughput applications
  • 🌐 Distributed - Supports clustering and replication

Configuration

Setup

Prerequisites

You need to have a PostgreSQL database ready. Open LangGraph Server will automatically create the required tables when you first run your application.

Configuration

Initialize Schema

Open LangGraph Server automatically creates the required tables on first run:

Schema Details

Core Tables

checkpoints

threads

checkpoint_writes

Connection Pooling

Open LangGraph Server automatically handles connection pooling. You can customize it:

Pool Configuration Options

  • DATABASE_POOL_SIZE: Maximum number of connections (default: 10)
  • DATABASE_SSL: Enable SSL connections (default: false)
  • DATABASE_MAX_IDLE_TIME: Maximum idle time in ms (default: 30000)
  • DATABASE_MAX_LIFETIME: Maximum connection lifetime in ms

Performance Characteristics

MetricPostgreSQL Performance
Read Latency
1-10ms
Write Latency
5-50ms
Concurrent Connections
100-1000+
Max Database Size
Unlimited (practical: 100s TB)
Memory Usage
256MB - 64GB+

Use Cases

Perfect for:

  • Production applications - Enterprise-grade reliability
  • High-traffic websites - Handles thousands of concurrent users
  • Multi-tenant platforms - Strong isolation and security
  • Enterprise applications - Advanced features and compliance

Best Practices

  • Use connection pooling - Configure appropriate pool size for your workload
  • Enable SSL - Use DATABASE_SSL=true for encrypted connections
  • Regular backups - Implement automated backup strategies
  • Monitor performance - Track database metrics and query performance
Built with

Show your support! Star us on GitHub ⭐️