Re: [External] Re: WAL Replication query

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: KK CHN <kkchn(dot)in(at)gmail(dot)com>
Cc: Ron <ronljohnsonjr(at)gmail(dot)com>, pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: [External] Re: WAL Replication query
Date: 2022-11-02 06:11:05
Message-ID: e86846e1f9bc1bb8339cf9709bf3a09100bbb680.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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 with H/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 case scenario?

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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message KK CHN 2022-11-02 08:40:21 Re: [External] Re: WAL Replication query
Previous Message Ron 2022-11-02 05:54:06 Re: [External] Re: WAL Replication query