From: Stephen Frost <sfrost@snowman.net>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Shukla, Pranjal <pshukla@akamai.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: PG12: Any drawback of increasing wal_keep_segments
Date: Tue, 29 Mar 2022 11:17:29 -0400
Message-ID: <20220329151729.GN10577@tamriel.snowman.net> (raw)
In-Reply-To: <202203241025.qygop5cr3qw7@alvherre.pgsql>
References: <ADB6E72A-8C34-47AB-99FD-EB839AE6B863@akamai.com>
<202203241025.qygop5cr3qw7@alvherre.pgsql>
Greetings,
* Alvaro Herrera (alvherre@alvh.no-ip.org) wrote:
> On 2022-Mar-22, Shukla, Pranjal wrote:
> > Are there any disadvantages of increasing the “wal_keep_segments” to a
> > higher number say, 500? Will it have any impact on performance of
> > streaming replication, on primary or secondary servers?
>
> No. It just means WAL will occupy more disk space. I've seen people go
> even as high as 5000 with no issues.
Yeah, though it makes the primary into essentially a WAL repository and,
really, you'd be better off having a dedicated repo that replicas can
pull from instead. Consider that a replica might fall way behind and
then demand the primary send 5000 WAL segments to it. The primary then
has to go pull that 80GB of data from disk and send it across the
network. As to if that's an issue or not depends on the IOPS and
bandwidth available, of course, but it's not free.
Thanks,
Stephen
Attachments:
signature.asc (application/pgp-signature, 818B) download
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: sfrost@snowman.net, alvherre@alvh.no-ip.org, pshukla@akamai.com
Subject: Re: PG12: Any drawback of increasing wal_keep_segments
In-Reply-To: <20220329151729.GN10577@tamriel.snowman.net>
References: <ADB6E72A-8C34-47AB-99FD-EB839AE6B863@akamai.com> <202203241025.qygop5cr3qw7@alvherre.pgsql> <20220329151729.GN10577@tamriel.snowman.net>
* 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