Hi,
Recently I came up with the similar idea and finally found the thread,
started to learn...
I found your performance looks very nice. IIUC, the performance can be decreased
if the wal_buffer is not enough large and walsenders always miss the cache,
right?
Can we confirm when it can happen?
Regarding the code, state->seg.ws_tli cannot be updated if
logical_read_xlog_page()
bypasses the actual WAL read. It seems to break the callback rule determined
in xlogheader.h:
```
* The callback shall set ->seg.ws_tli to the TLI of the file the page
was
* read from.
*/
XLogPageReadCB page_read;
```
Best regards,
Hayato Kuroda
FUJITSU LIMITED