On Wed, 2022-11-02 at 09:30 +0530, KK CHN wrote:
> I mean when the Primary Server crashes due to a H/W failure or whatever other reason,
> Then in my case I am forced to promote the Standby server as Primary until the
> old primary server H/W vendor replaces the hardware component( it may vary from hours to days as pre SLA terms
withH/W vendor).
>
> In this scenario any transactions happened in crashed Primary server which were not transferred due to the
> delay in transfer to the Standby server. But I am in need to promote the Standby to Primary and
> it will run for another one day or two, until my Old crashed server failed component is replaced with a new H/W
part.
>
> So there will be an inconsistency in the data between the current Primary ( promoted standby)
> and my recovered /repaired old server ( which was primary before the crash).
>
> How to handle this data inconsistency or what best mechanism needs to be implemented if you were me in this use
casescenario?
Thanks for the clarification.
Yes, in that case you can lose committed data. The normal way to avoid that is to use
synchronous replication. That is easy to set up, but has some implications:
- it will slow down data modifications considerably
- you should have a low network latency between the machines
- the whole system becomes unavailable if the standby goes down, so have at
least two synchronous standbys if you want good availability
Yours,
Laurenz Albe