| From: | Nitin Jadhav <nitinjadhavpostgres(at)gmail(dot)com> |
|---|---|
| To: | Jakub Wartak <jakub(dot)wartak(at)enterprisedb(dot)com> |
| Cc: | Imran Zaheer <imran(dot)zhir(at)gmail(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-18 10:44:24 |
| Message-ID: | CAMm1aWZy9+79xw_-hcLHmsRioeQYDFt_9oD2GuhqahfoXNSC5w@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi Xuneng,
> I share the concern here. It might be simpler to make the startup
> process the owner of recovery policy and make the producer a bounded,
> policy-free WAL reader. It might not be viable to decouple them
> cleanly since decoding is what discovers edege cases such as
> incomplete WAL, missing continuation records, and read boundaries.
> Still wondering whether those conditions can be reported to startup as
> events rather than letting the producer making these policy decisions.
Thanks for the thoughtful response. I agree with you.
I like the idea of keeping the startup as the single owner of recovery
policy, while keeping the producer bound to reading and decoding WAL
and reporting conditions. As you pointed out, decoding will naturally
discover edge cases such as incomplete WAL, missing continuation
records, and read-boundary issues. However, the policy decision for
those cases should remain in startup to avoid split authority.
An event-based contract seems like a good way to define this boundary:
the producer reports a typed condition with LSN context, and startup
decides the appropriate action. This should also make ownership
clearer across startup-local state, producer-local state,
WalPipelineParams, and mutable shared state, including which copy is
authoritative.
Even if this approach provides a smaller performance improvement than
the current v6 design, it may still be a worthwhile first phase if it
improves correctness and simplifies the architecture. Further
performance optimizations can be explored once the ownership and
communication contracts are stable.
Best Regards,
Nitin Jadhav
Azure Database for PostgreSQL
Microsoft
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Fabrizio Mello | 2026-08-18 11:23:12 | Add contrib module pg_stat_log: cumulative statistics about server log messages |
| Previous Message | Keyerror Smart | 2026-08-18 10:42:39 | [PATCH] pgcrypto: Ensure debug handler is reset on error in PGP functions |