Read WAL directly from WAL buffers.
authorJeff Davis <jdavis@postgresql.org>
Mon, 12 Feb 2024 18:36:18 +0000 (10:36 -0800)
committerJeff Davis <jdavis@postgresql.org>
Mon, 12 Feb 2024 19:11:22 +0000 (11:11 -0800)
commit91f2cae7a4e664e9c0472b364c7db29d755ab151
treea39e90a07d21b18bf85a6b83e954638631b4d9b5
parent09eb633e1baa3b7cd7929f3cc77f9c46f63c20b1
Read WAL directly from WAL buffers.

If available, read directly from WAL buffers, avoiding the need to go
through the filesystem. Only for physical replication for now, but can
be expanded to other callers.

In preparation for replicating unflushed WAL data.

Author: Bharath Rupireddy
Discussion: https://postgr.es/m/CALj2ACXKKK%3DwbiG5_t6dGao5GoecMwRkhr7GjVBM_jg54%2BNa%3DQ%40mail.gmail.com
Reviewed-by: Andres Freund, Alvaro Herrera, Nathan Bossart, Dilip Kumar, Nitin Jadhav, Melih Mutlu, Kyotaro Horiguchi
src/backend/access/transam/xlog.c
src/backend/access/transam/xlogreader.c
src/backend/replication/walsender.c
src/include/access/xlog.h