Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nZDbH-0006eu-KD for pgsql-general@arkaria.postgresql.org; Tue, 29 Mar 2022 15:17:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nZDbG-00056p-H2 for pgsql-general@arkaria.postgresql.org; Tue, 29 Mar 2022 15:17:38 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nZDbG-00056g-5s for pgsql-general@lists.postgresql.org; Tue, 29 Mar 2022 15:17:38 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nZDb9-0007dd-Hv for pgsql-general@lists.postgresql.org; Tue, 29 Mar 2022 15:17:37 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 111585F7A2; Tue, 29 Mar 2022 11:17:30 -0400 (EDT) Date: Tue, 29 Mar 2022 11:17:29 -0400 From: Stephen Frost To: Alvaro Herrera Cc: "Shukla, Pranjal" , "pgsql-general@lists.postgresql.org" Subject: Re: PG12: Any drawback of increasing wal_keep_segments Message-ID: <20220329151729.GN10577@tamriel.snowman.net> References: <202203241025.qygop5cr3qw7@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Yxqlz6doxDNRTZ24" Content-Disposition: inline In-Reply-To: <202203241025.qygop5cr3qw7@alvherre.pgsql> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Yxqlz6doxDNRTZ24 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Alvaro Herrera (alvherre@alvh.no-ip.org) wrote: > On 2022-Mar-22, Shukla, Pranjal wrote: > > Are there any disadvantages of increasing the =E2=80=9Cwal_keep_segment= s=E2=80=9D to a > > higher number say, 500? Will it have any impact on performance of > > streaming replication, on primary or secondary servers? >=20 > 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 --Yxqlz6doxDNRTZ24 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJiQyMJAAoJEO1sijiDR2RVqtQP/jRsubLofQEUiR5jWnjBYTwi ralB+fCGqYzL68ni60TCkZQF7TS36sxCDsmQeVM7Wmn4uV0ZcKlygQksm9sqLcbh lBD5MtPGYx5voBzU53lVd4nVAxRYOb4nFuKCc1i/QlOvbGkNrNPFaJkdKDh3teyF OMUm0uxv2v+2xtKJC78xIqIWH63liHSXc/MjFQuoHKcEECk4MB/CD58jcmZWXYHU taQqYc4Q4CbBZBrOJjBOi8fBHDYDksjhwkc81vOE4PNhLR/wr/BJVw9W0yuskvPI e1NyYYVMYdwyA+JZIf1JyIpC6BZEzerUUomKGBCzpuJCp5LJSn4IdTkzmSCO0H84 sy5SytvbzkwzuuuU6pqMQiB/XwKLnNIY5QkD6vbUXxzn3hF3gWdTGuJMAkUJNGyv 2DDLSb5c4jRpghwNn9F4Y0Pspik5T1zGrI1VrERcF9LZVsgxd9ej/CDlACOrbOlE idFQsGNpiuuetHvXDljITFKqM9+YBJSiyVAWOD6Zs0jvs8PxBg1DofJIIrCWjSfY X9H45ohz6ynhBiLmnltbv5I7xI7cVaX/oyqOhLRoFjWHv018gMv+wOQeRLSQTZ8j PtHmHvATUWgFlKiel3g8awLYtf8dg7IVBJP/IkN1S1Z61zeLEJULvgvogr8grmWd EPHZeenRdYZLYcbmiAm7 =EgLk -----END PGP SIGNATURE----- --Yxqlz6doxDNRTZ24--