From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Wyatt Alt <wyatt.alt@gmail.com>
To: pgsql-general@postgresql.org
Subject: Re: replication lag despite corrective config
Date: Tue, 20 Nov 2018 08:09:13 +0100
Message-ID: <489acb50e9f4cb043ec4797f338ae06e66c0287c.camel@cybertec.at> (raw)
In-Reply-To: <CAGem3qCCP5c7JZUMApteK7TXT2yMzVi_Yy2nsZ5Pn=R30LrDvw@mail.gmail.com>
References: <CAGem3qCCP5c7JZUMApteK7TXT2yMzVi_Yy2nsZ5Pn=R30LrDvw@mail.gmail.com>
On Mon, 2018-11-19 at 17:46 -0800, Wyatt Alt wrote:
> I've been struggling to eliminate replication lag on a Postgres 9.6.6
> instance on Amazon RDS. I believe the lag is caused by early cleanup
> conflicts from vacuums on the master, because I can reliably resolve
> it by killing long-running queries on the standby. I most recently
> saw ten hours of lag on Saturday and addressed it this way.
>
> The standby is running with
> hot_standby_feedback = on
> max_standby_streaming_delay = 5min
> max_standby_archive_delay = 30s
With these settings, any conflicting query will be canceled after five
minutes. Perhaps your actual settings are different.
What do you get for
SELECT * FROM pg_settings WHERE name = 'max_standby_streaming_delay';
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: laurenz.albe@cybertec.at, wyatt.alt@gmail.com
Subject: Re: replication lag despite corrective config
In-Reply-To: <489acb50e9f4cb043ec4797f338ae06e66c0287c.camel@cybertec.at>
References: <CAGem3qCCP5c7JZUMApteK7TXT2yMzVi_Yy2nsZ5Pn=R30LrDvw@mail.gmail.com> <489acb50e9f4cb043ec4797f338ae06e66c0287c.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox