Re: Sending unflushed WAL in physical replication

From: Aleksander Alekseev <aleksander(at)tigerdata(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Cc: Rahila Syed <rahilasyed90(at)gmail(dot)com>, Melih Mutlu <m(dot)melihmutlu(at)gmail(dot)com>
Subject: Re: Sending unflushed WAL in physical replication
Date: 2025-09-29 13:55:06
Message-ID: CAJ7c6TMpYybu1NO3BTL_PUSx35hDrQQLbkmcK6_xGOZSnwgXXg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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 sounds OK.

I wanted to clarify: what happens if master doesn't increase flushPtr
and replica runs out of memory for WAL records?

> Benchmark details are as follows:
> Synchronous replication with remote write enabled.
> Two Azure VMs: Central India (primary), Central US (standby).
> [...]

I'm curious what happens:

1. When master and replica are located in the same datacenter.
2. What happens for small transactions?

--
Best regards,
Aleksander Alekseev

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2025-09-29 14:00:22 Re: Use "?=" operator for a contrib makefile in documentation
Previous Message Robert Haas 2025-09-29 13:28:55 Re: RFC: extensible planner state