PostgreSQL
DestinationOpen-Source

Deliver data to PostgreSQL

PostgreSQL is a free and open-source relational database management system (RDBMS) emphasizing extensibility and SQL compliance.

Quick Start

Connect in minutes with SQL

Use CREATE SINK to deliver processed data from RisingWave to PostgreSQL. Define your transformation logic in SQL and let RisingWave handle delivery, retries, and exactly-once semantics.

SQL
CREATE SINK target_count_postgres_sink AS
SELECT
    order_status,
    COUNT(*) as order_count,
    SUM(total_amount) as total_revenue,
    AVG(total_amount) as avg_order_value,
    MIN(last_updated) as first_order_time,
    MAX(last_updated) as last_order_time
FROM orders_rw WITH (
    connector = 'jdbc',
    jdbc.url = 'jdbc:postgresql://postgres:5432/mydb?user=myuser&password=123456',
    table.name = 'target_count',
    type = 'upsert',
    primary_key = 'target_id'
);

For comprehensive configuration details, please refer to the PostgreSQL connector documentation.

Capabilities

What you can do with RisingWave + PostgreSQL

Continuous Delivery

Automatically sink processed results from RisingWave to PostgreSQL as new data arrives. No batch jobs needed.

Exactly-once Semantics

Guaranteed data correctness when delivering to PostgreSQL with barrier-based checkpointing.

Upsert & Append

Support both append-only and upsert modes when sinking to PostgreSQL, depending on your use case.

Sink Decoupling

Built-in buffering ensures RisingWave stays stable even if PostgreSQL experiences temporary slowdowns.

Start streaming in minutes

Connect to PostgreSQL with just a few lines of SQL. No infrastructure to manage, no code to write.

Best-in-Class Event Streaming
for Agents, Apps, and Analytics
GitHubXLinkedInSlackYouTube
Sign up for our to stay updated.