Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rPP2E-00BJlm-D6 for pgsql-hackers@arkaria.postgresql.org; Mon, 15 Jan 2024 15:37:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rPP2D-00FvAs-HX for pgsql-hackers@arkaria.postgresql.org; Mon, 15 Jan 2024 15:37:57 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rPP2C-00FvAk-Fy for pgsql-hackers@lists.postgresql.org; Mon, 15 Jan 2024 15:37:57 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rPP29-001fVb-7Q for pgsql-hackers@lists.postgresql.org; Mon, 15 Jan 2024 15:37:55 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id DCE7F5C0196 for ; Mon, 15 Jan 2024 10:37:51 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 15 Jan 2024 10:37:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1705333071; x=1705419471; bh=VLRTgbDVNNcuhfsfBYkK/UmwSW8c fOnsDMHoqPKxwqw=; b=HKWdCd/b/PqMTV5MpsH/RgrO861bjYM8lpn14jeJ1VLT Y+zRK1biJnYkXDdmr4h9FNDM62z6ICrUadQcMo1WnVcFvI05wYJ5yA0kyunGV9c8 2cLCdKhNMeQkp/jkuGsN6j+hwVfhg63ZQlC5LnNscE9JAM/PbtNtJRCdsDWPxHf0 SZQ4r3PsBSMdpHJapBxK4AGBNZ6LGHU4ddOfi8VfBHbTXzBjwbmzPReAXcp4MM3+ OVPsEaUWHy3hVeUvAFm4VLDj22f2+gKutcXYRnW5ZNr5HJw82yzByeuoVXEAbrg7 M7L9PxRHRrkxaX79DtV4NdfIPD8iFwqCphzn8zmi4A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdejuddgjeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfggtggugfesmhekreertddtjeenucfhrhhomheptehlvhgrrhho ucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgheqne cuggftrfgrthhtvghrnhepteelfeejkeethfffgeeiuddtvdfhfefgveehudehleefhefg veelgeeggeethfelnecuffhomhgrihhnpehpohhsthhgrhdrvghspdgvnhhtvghrphhrih hsvggusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Mon, 15 Jan 2024 10:37:51 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1705333069; bh=Je4TkTKoHAq95bHhm/lwJnKvIZqpdrky/a388W8kAnY=; h=Date:From:To:Subject:From; b=BBmrBC+c+TF6iemdV/qhOAqhOAqvgLOC7IRPq4LJIa1lKmKzBKcR/Y/oyglEE0Nrd 1vaA3bnFqtcup0ka1zN18Ox6oRXJkEvF9TZoxOyBK4Klv9ckqsXnv0NttjF5jysCR1 D1drBeCU/cqEwSblYJg3O6XAOVIgjfdpD+bBtV3pv84puUl2+TDxER7sMfHmr6OuuO 6jrLjlv9Dzh9Cd12jcubbu3qYHZBI/yiMb5BPX1aJJ9ojxPFX1lVavZ3qXAhnnFU4z pLU+oiZAE2pWviqKNo0O6Z9xoMztICdYDdyOOuohwJIP40v9QbCv6/ZTL1GuUlfrnZ LdyBHCINYu/2A== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id B42D89D; Mon, 15 Jan 2024 16:37:49 +0100 (CET) Date: Mon, 15 Jan 2024 16:37:49 +0100 From: Alvaro Herrera To: Pg Hackers Subject: minor replication slot docs edits Message-ID: <202401151537.ryhysqfncs6d@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="shb23uhsdnji4c2q" Content-Disposition: inline Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --shb23uhsdnji4c2q Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Pursuant to a comment I made a few months ago[1], I propose the attached changes to replication slots documentation. In essence, I want to explain that replication slots are good, and the max_size GUC, before moving on to explain that the other methods are worse. Thanks [1] https://postgr.es/m/20230413111838.e7yxke2dtwrxw3qy@alvherre.pgsql -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "Entristecido, Wutra (canción de Las Barreras) echa a Freyr a rodar y a nosotros al mar" --shb23uhsdnji4c2q Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="0001-Rework-paragraphs-in-replication-slots-docs.patch" From c003a2c6ae8d1c177fbd4c1f77b428c5ad24e705 Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Fri, 19 May 2023 20:15:52 +0200 Subject: [PATCH] Rework paragraphs in replication slots docs Discussion: https://postgr.es/m/20230413111838.e7yxke2dtwrxw3qy@alvherre.pgsql --- doc/src/sgml/high-availability.sgml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/doc/src/sgml/high-availability.sgml b/doc/src/sgml/high-availability.sgml index 9dd52ff275..887366bdec 100644 --- a/doc/src/sgml/high-availability.sgml +++ b/doc/src/sgml/high-availability.sgml @@ -930,25 +930,27 @@ primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass' recovery conflict even when the standby is disconnected. + + Beware that replication slots can retain so many WAL segments that they + fill up the space allocated for pg_wal. + can be used to limit the size + of WAL files retained by replication slots. + In lieu of using replication slots, it is possible to prevent the removal of old WAL segments using , or by storing the segments in an archive using or . - However, these methods often result in retaining more WAL segments than + A disadvantage of these methods is that they + often result in retaining more WAL segments than required, whereas replication slots retain only the number of segments - known to be needed. On the other hand, replication slots can retain so - many WAL segments that they fill up the space allocated - for pg_wal; - limits the size of WAL files - retained by replication slots. + known to be needed. Similarly, on its own, without also using a replication slot, provides protection against relevant rows being removed by vacuum, but provides no protection during any time period - when the standby is not connected. Replication slots overcome these - disadvantages. + when the standby is not connected. Querying and Manipulating Replication Slots -- 2.39.2 --shb23uhsdnji4c2q--