public inbox for [email protected]  
help / color / mirror / Atom feed
Can logical replication be a solution to my current MariaDB/Galera setup?
3+ messages / 2 participants
[nested] [flat]

* Can logical replication be a solution to my current MariaDB/Galera setup?
@ 2026-05-22 13:18 Michael Grimm <[email protected]>
  2026-05-23 06:33 ` Re: Can logical replication be a solution to my current MariaDB/Galera setup? [email protected]
  0 siblings, 1 reply; 3+ messages in thread

From: Michael Grimm @ 2026-05-22 13:18 UTC (permalink / raw)
  To: [email protected]

Hi,

this is my first post to this mailing list, and I hope that I chose the correct mailing list.

I have never run a postgres server before, but I do run a mariadb galera cluster [1] for storing emails by an IMAP server [2]. Distribution and failover is dealt by haproxy [3]. This mail server setup has to deal with less than 250 mails a day, a database size of under 6 GB, and a handful of users. You see, that this system is bored to death ;-)  

I have read a lot about replication in order to find something comparable to a galera cluster with its multi master capabilities. Now, I have learned that multi master can only be achieved by using third party plugins. Not all of those are available for my FreeBSD systems, though.

As a newbie I do currently tend to use logical replication with mutual publish and subscribe instead, either by pglogical2 or "self-made". I am in the -probably naive- impression that this could work. As before, failover will be handled by haproxy by simply directing read/write access to another postgres node available. When a failed node will become online again, logical replication should enable this node to recover, right?

Here are my questions:

#) Is this feasible or nonsense?
#) What would an alternatives for FreeBSD be (pgpool-II, repmgr, …)?

Any input is highly appreciated.

Thanks in advance and regards,
Michael


[1] 3 nodes, primary-primary replication.
[2] https://dbmail.org/en/
[3] All incoming MUA requests are directed to a single node in order to prevent split brain situations

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Can logical replication be a solution to my current MariaDB/Galera setup?
  2026-05-22 13:18 Can logical replication be a solution to my current MariaDB/Galera setup? Michael Grimm <[email protected]>
@ 2026-05-23 06:33 ` [email protected]
  2026-05-24 14:01   ` Re: Can logical replication be a solution to my current MariaDB/Galera setup? Michael Grimm <[email protected]>
  0 siblings, 1 reply; 3+ messages in thread

From: [email protected] @ 2026-05-23 06:33 UTC (permalink / raw)
  To: [email protected]

Am 22.05.26 um 15:18 schrieb Michael Grimm:
> I have never run a postgres server before, but I do run a mariadb
> galera cluster [1] for storing emails by an IMAP server [2].
> Distribution and failover is dealt by haproxy [3]. This mail server
> setup has to deal with less than 250 mails a day, a database size of
> under 6 GB, and a handful of users. You see, that this system is
> bored to death ;-)
> 
> I have read a lot about replication in order to find something
> comparable to a galera cluster with its multi master capabilities.
> Now, I have learned that multi master can only be achieved by using
> third party plugins. Not all of those are available for my FreeBSD
> systems, though.
> 
> As a newbie I do currently tend to use logical replication with
> mutual publish and subscribe instead, either by pglogical2 or "self-
> made". I am in the -probably naive- impression that this could work.
> As before, failover will be handled by haproxy by simply directing
> read/write access to another postgres node available. When a failed
> node will become online again, logical replication should enable
> this node to recover, right?
> 
> Here are my questions:
> 
> #) Is this feasible or nonsense?
> #) What would an alternatives for FreeBSD be (pgpool-II, repmgr, …)?

For such a system I don't see the need for a multi-master setup (neither
with Postgres nor with MariaDB).

That's typically used if you need to spread the write load across nodes,
quite frequently because access is geographically distributed and the
latency is not acceptable.

For high availability you don't need multi-master. A standard
streaming replication with a failover mechanism is completely enough
in my opinion.










^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Can logical replication be a solution to my current MariaDB/Galera setup?
  2026-05-22 13:18 Can logical replication be a solution to my current MariaDB/Galera setup? Michael Grimm <[email protected]>
  2026-05-23 06:33 ` Re: Can logical replication be a solution to my current MariaDB/Galera setup? [email protected]
@ 2026-05-24 14:01   ` Michael Grimm <[email protected]>
  0 siblings, 0 replies; 3+ messages in thread

From: Michael Grimm @ 2026-05-24 14:01 UTC (permalink / raw)
  To: [email protected]

[email protected] wrote:
> Am 22.05.26 um 15:18 schrieb Michael Grimm:

>> I have never run a postgres server before, but I do run a mariadb
>> galera cluster [1] for storing emails by an IMAP server [2].
>> Distribution and failover is dealt by haproxy [3].
> 
> For such a system I don't see the need for a multi-master setup (neither
> with Postgres nor with MariaDB).

What I didn't mention in my mail is: incoming mails at all three mail servers become stored into each user's mailbox  at the server they arrive (LMTP). In this scenario multi-master is handy.

But see below.

> For high availability you don't need multi-master. A standard
> streaming replication with a failover mechanism is completely enough
> in my opinion.

Thanks for this hint w.r.t. streaming replication.

I have made some research about this kind of cluster and come to the conclusion that streaming replication plus repmgr [1] will meet my expectations.

BUT: I will need to configure haproxy to route all IMAP and LMTP traffic to the "current" master, only. 

I am hoping that this can be achieved by a customised health check plus routing, but I have never done that before, though.

Thanks and regards,
Michael



[1] available in the FreeBSD ports collection





^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2026-05-24 14:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-05-22 13:18 Can logical replication be a solution to my current MariaDB/Galera setup? Michael Grimm <[email protected]>
2026-05-23 06:33 ` [email protected]
2026-05-24 14:01   ` Michael Grimm <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox