Subject: Re: Built-in Raft replication

From: Jim Nasby <[email-masked]>
Date: Wed, 23 Apr 2025 11:48:46 -0500

On Apr 16, 2025, at 2:29 PM, Greg Sabino Mullane <[email-masked]> wrote:
> 
> On Wed, Apr 16, 2025 at 2:18 AM Ashutosh Bapat <[email-masked] <mailto:[email-masked]>> wrote:
>> Users find it a waste of resources to deploy 3 big PostgreSQL instances just for HA where 2 suffice even if they deploy 3 lightweight DCS instances. Having only some of the nodes act as DCS and others purely PostgreSQL nodes will reduce waste of resources.
> 
> A big problem is that putting your DCS into Postgres means your whole system is now super-sensitive to IO/WAL-streaming issues, and a busy database doing database stuff is going to start affecting the DCS stuff.  With three lightweight DCS servers, you don't really need to worry about how stressed the database servers are. In that way, I feel etcd et al. are adhering to the unix philosophy of "do one thing, and do it well.”

… unless we added multiple WAL streams. That would allow for splitting WAL traffic across multiple devices as well as providing better support for configurations that don’t replicate the entire cluster. The current situation where delayed replication of a single table mandates retention of all the WAL for the entire cluster is less than ideal.

---

From: Devrim Gündüz <[email-masked]>
Date: Wed, 23 Apr 2025 20:01:05 +0300

Hi,

On Wed, 2025-04-23 at 11:48 -0500, Jim Nasby wrote:
> unless we added multiple WAL streams. That would allow for splitting
> WAL traffic across multiple devices as well as providing better
> support for configurations that don’t replicate the entire cluster.
> The current situation where delayed replication of a single table
> mandates retention of all the WAL for the entire cluster is less than
> ideal.

I think the problem is handling the stream of global objects. Having
separate stream for each database would be awesome as long as it can
deal with the "global stream".

Regards,
-- 
Devrim Gündüz
Open Source Solution Architect, PostgreSQL Major Contributor
BlueSky: @devrim.gunduz.org , @gunduz.org

---

From: Jim Nasby <[email-masked]>
Date: Tue, 29 Apr 2025 15:16:07 -0500

I've always assumed there'd have to be at least one global stream, if for
no other purpose than to be the source of truth about transaction commit
ordering (though, I was thinking of supporting multiple streams for one
database). Presumably the same could be used for shared objects. Or perhaps
shared objects just get their own stream. Either way, having a master
commit record that points at LSNs of various other streams is what I'd been
thinking.