Re: Sending unflushed WAL in physical replication

2025-10-18 Thread Rahila Syed
Hi, > > Please find attached a POC patch that introduces changes to the WAL > sender and > > receiver, allowing WAL records to be sent to standbys before they are > flushed > > to disk on the primary during physical replication. [..] > > I didn't look at the code but your description of the desi

Re: Sending unflushed WAL in physical replication

2025-10-18 Thread Rahila Syed
Hi, > At the high level idea LGTM. > > Thank you for looking into it. >> Observations from the benchmark: >> 1. The patch improves TPS by ~13% in the sync replication setup. In >> repeated runs, >> I see that the TPS increase is anywhere between 5% to 13% . >> 2. WAL sender reads significantl

Re: Sending unflushed WAL in physical replication

2025-10-18 Thread Andrey Borodin
> On 26 Sep 2025, at 00:02, Rahila Syed wrote: > > Kindly let me know your thoughts. What about crash recovery? Unflushed WAL might get overwritten after crash recovery. Primary must switch to new timeline to prevent problems, related to this situation. Best regards, Andrey Borodin.

Re: Sending unflushed WAL in physical replication

2025-10-18 Thread Aleksander Alekseev
Hi, > This is a great question. I'm currently working on implementing a solution > for this. > One possible solution is to write the records to a spill file when the flush > pointer > indicates that none have been flushed on the primary. Once they have been > flushed > on the primary, the recor

Re: Sending unflushed WAL in physical replication

2025-10-17 Thread Aleksander Alekseev
Hi Rahila, > Please find attached a POC patch that introduces changes to the WAL sender and > receiver, allowing WAL records to be sent to standbys before they are flushed > to disk on the primary during physical replication. [..] I didn't look at the code but your description of the design sound

Re: Sending unflushed WAL in physical replication

2025-09-27 Thread SATYANARAYANA NARLAPURAM
Hi Rahila, On Thu, Sep 25, 2025 at 12:02 PM Rahila Syed wrote: > Hi, > > Please find attached a POC patch that introduces changes to the WAL sender > and > receiver, allowing WAL records to be sent to standbys before they are > flushed > to disk on the primary during physical replication. This i

Sending unflushed WAL in physical replication

2025-09-25 Thread Rahila Syed
Hi, Please find attached a POC patch that introduces changes to the WAL sender and receiver, allowing WAL records to be sent to standbys before they are flushed to disk on the primary during physical replication. This is intended to improve replication latency by reducing the amount of WAL read fr