Re: Middleware Messages for FE/BE - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Middleware Messages for FE/BE
Date
Msg-id CANbhV-E0XHgdQdQiw=EZrndo+Mk-+aiiii9jP3+0M6VaM83aAQ@mail.gmail.com
Whole thread Raw
In response to Re: Middleware Messages for FE/BE  (Hannu Krosing <hannuk@google.com>)
List pgsql-hackers
On Thu, 19 Aug 2021 at 10:58, Hannu Krosing <hannuk@google.com> wrote:
>
> Actually the way I have been thinking about this would be a message
>
>  "Hey replica x.x.x.x, please take over the write head role"
>
> Which would
>
> 1. cause the replica  x.x.x.x to self-promote at this point-in-WAL
> 1A - optionally the old write head becomes a replica (it should
> mention it in message if it plans to stay around as a replica)
> 2. tells other replicas to switch over and start replicating from it
> 3. tells all connected clients to switch, if they need read-write access.
>
> This could be even done without timeline switch, as it should
> guarantee that there is no split brain writing
> Of course there are (and should be) ways to still use the WALs
> normally for cases where replica x.x.x.x does not exists, like PITR
>
> And making this play nicely with Logical Decoding is another can of
> worms needing to be solved, but it is a start to becoming "Cloud
> Native" :)

Good ideas!

-- 
Simon Riggs                http://www.EnterpriseDB.com/



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Middleware Messages for FE/BE
Next
From: Fujii Masao
Date:
Subject: Re: RFC: Logging plan of the running query