public inbox for [email protected]
help / color / mirror / Atom feedFrom: Muhammad Imtiaz <[email protected]>
To: Mukesh Tanuku <[email protected]>
Cc: [email protected]
Subject: Re: Replication lag in Postgres
Date: Sat, 13 Jul 2024 14:34:21 +0500
Message-ID: <CANwR1ORFW3-JaRE+o3riD2x=t-y0=NQK=7VFiC4EgCF8kJJ+TA@mail.gmail.com> (raw)
In-Reply-To: <CAJzgB-FgxbU15L3iyu84B8ZJdOvqfY9HM4s2Qc27f74=a43MKA@mail.gmail.com>
References: <CAJzgB-FgxbU15L3iyu84B8ZJdOvqfY9HM4s2Qc27f74=a43MKA@mail.gmail.com>
Hi,
I recommend the following configurations/options in this case:
• wal_sender_timeout: This setting determines how long the primary server
waits for the standby server to acknowledge receipt of WAL data. Adjusting
this can help ensure timely data transfer.
• wal_keep_size: Ensures that enough WAL files are retained for the standby
to catch up if it falls behind.
• checkpoint_timeout: Adjust the checkpoint frequency to ensure WAL files
are regularly flushed and sent to the standby server regularly.
• pg_receivewal: Use this tool to continuously archive WAL files to a safe
location.It will helpful if there is a delay in streaming replication, you
have a backup of WAL files.
Regards,
Muhammad Imtiaz
On Fri, 12 Jul 2024, 20:11 Mukesh Tanuku, <[email protected]> wrote:
> Hello everyone.
> Firstly thanks to the community members who are addressing all the queries
> that are posted. Those give us more insights about the issues/doubts in the
> postgres.
>
> 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?
>
> Thank you
> Regards
> Mukesh T
>
>
view thread (4+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Replication lag in Postgres
In-Reply-To: <CANwR1ORFW3-JaRE+o3riD2x=t-y0=NQK=7VFiC4EgCF8kJJ+TA@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox