From: | Julien Rouhaud <rjuju123(at)gmail(dot)com> |
---|---|
To: | Ashok Patil <ashokrpatil(at)gmail(dot)com> |
Cc: | Romain MAZIÈRE <romain(dot)maziere(at)sigmaz-consilium(dot)fr>, pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: Query regarding managing Replication |
Date: | 2023-07-10 08:02:33 |
Message-ID: | CAOBaU_bX4fyXnUNU_bOKa3+ju=k1WEkMW_RKLuqvsa2cdtGiRA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, Jul 10, 2023 at 3:41 PM Ashok Patil <ashokrpatil(at)gmail(dot)com> wrote:
> Hello Julien,
>
> I need some more help regarding replication.
>
> Where Primary server can switch to Standby server role and stand by server
> can switch to Primary server role.
> [image: image.png]
> In our case we maintain two servers Server1 and Server2.. Server1 will be
> active and Server2 will be passive.
> In case when Server1 is crashed Server2 will be active in result it starts
> Keyclock instance and keyclock will connect with Standby postgres server.
>
> As per current replication steps, we found that Standby server will always
> be in read only mode. we want to switch it to r/w mode and primary to read
> only mode.
>
> or even it is ok both primary and stand by will always be in read-write
> mode. but both should replicate data.
>
> I searched so many option on internet but did not found exact one.. Will
> you please propose me some good solutions..
>
> Proper steps should be appreciable..
>
I don't know what KeyClock is, but I'm assuming that what you're looking
for is a High Availability solution, not how to setup replication, as
postgres itself only provides way to perform specific actions (promote a
standby to primary, build a new standby...) and third-party tools adds the
necessary logic for something more fancy. For general overview or how to
perform a failover you can look at the documentation at
https://www.postgresql.org/docs/current/high-availability.html. If you're
looking for a HA solution, I would recommend looking into Patroni:
https://patroni.readthedocs.io/en/latest/
From | Date | Subject | |
---|---|---|---|
Next Message | André Kutepow | 2023-07-10 08:27:55 | search_path for replica-mode |
Previous Message | Erik Wienhold | 2023-07-10 07:43:03 | Re: INSERT UNIQUE row? |