Re: Replication lag in Postgres

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Mukesh Tanuku <mukesh(dot)postgres(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Replication lag in Postgres
Date: 2024-07-12 15:43:24
Message-ID: b964a187dc8796de61d632bfe4bc4757d25501e3.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 2024-07-12 at 20:41 +0530, Mukesh Tanuku wrote:
> I have a question with postgres HA setup.
> We are setting up a 2 node postgres cluster with async streaming replication, we want to
> define a RPO (Recovery point objective) in case of primary failure. 
>
> How can we best define the RPO in this setup? since it's an async streaming replication
> setup there might be a chance of data loss which is proportional to the replication delay. 
>
> Is there any way we can configure the delay duration, like for example to make sure every
> 10 mins the standby sync has to happen with primary? 

When there is a delay, it is usually because replay at the standby is delayed.
The WAL information is still replicated. You won't lose that information on
failover; it will just make the failover take longer.

Unless you have a network problem, you should never lose more than a fraction
of a second.

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mukesh Tanuku 2024-07-13 06:02:53 Re: Replication lag in Postgres
Previous Message Mukesh Tanuku 2024-07-12 15:11:03 Replication lag in Postgres