Re: [WIP] Pipelined Recovery

From: Nitin Jadhav <nitinjadhavpostgres(at)gmail(dot)com>
To: Imran Zaheer <imran(dot)zhir(at)gmail(dot)com>
Cc: Jakub Wartak <jakub(dot)wartak(at)enterprisedb(dot)com>, Xuneng Zhou <xunengzhou(at)gmail(dot)com>, assam258(at)gmail(dot)com, Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [WIP] Pipelined Recovery
Date: 2026-08-17 12:07:24
Message-ID: CAMm1aWYzqyVn4P6TgYuFq8ojRm=yoA-Xey2MXArXTGEqE8svtQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

+1 on the overall direction. Decoupling WAL decode from redo looks
like a promising way to improve CPU-bound recovery, and the
performance numbers are encouraging. Thanks for posting v6; I reviewed
the series at a high level.

My main concern is the startup-to-producer state handoff. Startup
exports a broad recovery snapshot, but the producer appears to restore
only part of it. That can leave the two sides operating with different
views of the recovery state.

This becomes more important because the state is spread across
startup-local state, producer-local state, WalPipelineParams, and
shared mutable state. In this model, correctness depends on a clear
ownership contract for each field: who writes it, who reads it, when
it may change, and which copy is authoritative if values diverge.
Without that contract, it is difficult to reason about behavior under
races.

Relatedly, it would help to document queue/replay invariants in one
place: strict LSN ordering, no silent drop/skip, defined ordering
between data and shutdown/error messages, and clear behavior on
queue-full and early-exit paths. The consumer side in-place
deserialization path also needs an explicit memory-lifetime guarantee,
so pointer validity during redo is unambiguous.

Best Regards,
Nitin Jadhav
Azure Database for PostgreSQL
Microsoft

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Matthias van de Meent 2026-08-17 12:15:22 Re: Logical replication row filter loses unchanged toasted columns
Previous Message Marcos Pegoraro 2026-08-17 12:04:21 Document that jsonpath == can be used as ANY