Blog/Technical Discussion

The PostgreSQL Streaming Model

2026-04-15 · YMatrix Team
#Technical Discussion

A Question We Never Asked

What if PostgreSQL is already a streaming system?

At first glance, this sounds wrong. When we think about streaming systems, we think about systems like Kafka or Flink. Systems designed for continuous data processing.

PostgreSQL, on the other hand, is considered a traditional database — designed for storage and query. But this distinction may not be as fundamental as we think.

WAL Is a Stream

Every change in PostgreSQL is written to WAL (Write-Ahead Log). WAL has three key properties:

  • It is append-only
  • It is strictly ordered
  • It is durable

These are exactly the defining properties of a stream.

From a systems perspective:

WAL is not just a log. It is a stream.

Once you see this, a new question emerges:

If PostgreSQL already has a stream, why doesn’t it behave like a streaming system?

The Missing Piece: Computation

The difference between PostgreSQL and streaming systems is not data.

It is computation.

Traditional PostgreSQL executes queries in a batch model:

  • A query reads a snapshot
  • Computes a result
  • Returns it

Every time data changes, the query must be re-executed.

Streaming systems do something fundamentally different:

  • They react to changes
  • They update results incrementally

This leads to a key insight:

Batch recomputes. Streaming reacts.

From SQL to Incremental Computation

If WAL is the stream, then the next question is:

Can SQL operate on streams?

The answer is yes — but not in its traditional form.

We need to transform SQL into an incremental computation model.

This is what we call:

DeltaPlan

DeltaPlan changes the execution paradigm:

  • Instead of recomputing results
  • It propagates changes

Every update becomes a delta.

Every operator becomes incremental.

This turns SQL into a continuous computation engine.

The PostgreSQL Streaming Model

At this point, we can describe a unified model:

WAL → Logical Decoding → Events
                ↓
             DeltaPlan
                ↓
       Streaming Execution
                ↓
         Continuous Results

This is the core idea:

  • WAL provides the stream
  • DeltaPlan defines the computation
  • Execution becomes continuous

The result is not a static table.

It is a continuously updated view of the data.

Rethinking PostgreSQL

This leads to a fundamental shift in how we understand PostgreSQL.

PostgreSQL is not just a database.

It is a system that already contains:

  • A streaming data source (WAL)
  • A powerful computation language (SQL)

What it lacks is an explicit bridge between the two.

Once that bridge is built:

PostgreSQL becomes a streaming system.

What Domino Does

Domino does not introduce a new paradigm.

It makes an implicit one explicit.

  • It turns WAL into a first-class stream
  • It turns SQL into incremental computation
  • It turns tables into continuous results

In other words:

Domino is an implementation of the PostgreSQL Streaming Model.

Conclusion

Let’s go back to the original question.

Is PostgreSQL already a streaming system?

If WAL is a stream, and SQL can be incremental, then the answer is:

Yes.

PostgreSQL is already a streaming system. We just didn’t see it.