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.98.2) (envelope-from ) id 1xBu7X-00000003RmX-0XB1 for pgsql-docs@arkaria.postgresql.org; Wed, 30 Sep 2026 13:13:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xBu7V-00000002Tui-0Or4 for pgsql-docs@arkaria.postgresql.org; Wed, 30 Sep 2026 13:13:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xBu7U-00000002Tua-3Yy2 for pgsql-docs@lists.postgresql.org; Wed, 30 Sep 2026 13:13:12 +0000 Received: from mail-wr2-x0e.google.com ([2a00:1450:4864:30::e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1xBu7S-000000026Wj-1sAL for pgsql-docs@lists.postgresql.org; Wed, 30 Sep 2026 13:13:12 +0000 Received: by mail-wr2-x0e.google.com with SMTP id ffacd0b85a97d-48b017a3be3so574283f8f.2 for ; Wed, 30 Sep 2026 06:13:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1790773989; x=1791378789; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:content-type :references:in-reply-to:date:to:from:subject:message-id:from:to:cc :subject:date:message-id:reply-to:content-type; bh=yOBxNhuqOy/VwoMvX+J5zrRbSWrACzJ4ZXnjQV4rItI=; b=bt2prJcVcyiprZ0Rp/dxwSeHvCX9ko+6I4KcnN1g758UReqooGf/5uIB7EPXrrksuT 4W5Tj4uAA9SXB/u/W7P8fII/W5Vk2g7MSqBhESMU7AVRG/XFTcQ+B/H7ZEeNQNdD/io1 zn5O8LPA09fpOXCymLotjltwat+8zMOgydTicwTMrjAvPIFaR46zXsC+yGWluF4UoOdU Sof2ixmsW5SW/S7Te+H0FsFpgq4q0wG7QIZ0saMi8muFoR3trW1UL9IuKWSprloWQcUQ IG8f4y3o24OMTaSnm7zxmlRRfhEud4AERXp2lnOG/I4J1R93Fed2EJKg/wQU/P4+DdiD IEEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790773989; x=1791378789; h=mime-version:user-agent:content-transfer-encoding:content-type :references:in-reply-to:date:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=yOBxNhuqOy/VwoMvX+J5zrRbSWrACzJ4ZXnjQV4rItI=; b=u9KPPU8abj3HT1zUZVkZftTNptlsHL53En9z+F7yePh0FivXOsqv7gGO3fZIDXCOgp GvKvFAhsEmpVMYZMgTTNC9pCgYOo5SBzFfZZzLrKBsmiT7daNVSQ/vVOmHgzGhTKw8w5 tzGGNypDrSblsfOpSIEEW7TftWuW4Eq03uIt2N9lTyTyjxdHehrDuZ78oHAUnO5KoP1U 0Xj8f9f2x/rIpO9lH+hGRgTi/O463az2yBJ9M2yFOde8Dfl3rAATlZnt4HplkBIdkacM Jj6PZJqpSlqU2r38lHyxhD7Pm/bEEoJT+o9cvUdoyIkGcM4DcpgMd+TG2ZVwRU2Yyvwq F12Q== X-Forwarded-Encrypted: i=1; AKwUvBxdGLUYtE/Qhnf+TnzMdmXU9GY1W5aWZHl3Z6kLpIC0FG+KJbGka73LsHfyt2+0O4x0e7LOGWaL10P+@lists.postgresql.org X-Gm-Message-State: AFq9FYIYWWL6OxqvRZbttUfbaqxEe+Ev+6oaQslzl5YLkPmhdSr6buCE DoeY3yOFUcUb5mpr4ZqwOTdOTtD/mFa5nYQan/DE+SnrmGMOYw9Q/ZYBkHVQQ8k12Rk= X-Gm-Gg: AYBFou3efo+2/BfIGkgnF82OaCUYF/bYu8czp64qIuV4QQaztLHJAa4I3jNh24xMTr0 eMX+HfbXdgcee9vMVTdUo5Po3zobr7zRhFBq+CgYnuoc6jep0H+PEqJLPurm3w2sFY2QLOEINtU cFSjrbjqUcTdb8R9ve4Rneum0dpT63mwTlYemcJicfxsUPLecS5qvtRk3TKWwY5qVScE/RMYPGP TEyRxecfaTO3IKdG2EW2sNCwDbpvVyJoHkPeEwPbskLmBH4YSC1qm4az0lFGbkG/xMZGI+jnUIO ZDr+h937UKinfUHrvS3IzbDpx7NIIMOFzrlQQIsAoUPda+LvXi3B6cjESuu1Sc4UlagRB3HV3nj xoyIVHwgJzjX3FlxMXcWkq4TzZDIqHw8LkGdazma7bYB82INJLd2iXeL1KoJq6XETH0g+BcEShD 8ZipSN0ditlx0TtvHMQicAO/rH1OwS2rRtie7d8P5RT9MJn/PgZRoFtEeAWAQNNidO0c4fmzzvf 6NKTzi+NUBT5WLq6Sw/2PxX X-Received: by 2002:a5d:5f91:0:b0:488:8b97:3cc1 with SMTP id ffacd0b85a97d-48b024259a5mr3282314f8f.6.1790773989055; Wed, 30 Sep 2026 06:13:09 -0700 (PDT) Received: from laurenz.albe-K4N0CV00F97414D ([41.66.99.200]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48b02a0d8bfsm3107273f8f.36.2026.09.30.06.13.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Sep 2026 06:13:08 -0700 (PDT) Message-ID: Subject: Re: Clarify base backups and local pg_wal recycling From: Laurenz Albe To: Toppr Tenali , pgsql-docs@lists.postgresql.org Date: Wed, 30 Sep 2026 15:13:07 +0200 In-Reply-To: <91E1FA52-66B0-44F5-91C6-17FF3B5D23AB@gmail.com> References: <91E1FA52-66B0-44F5-91C6-17FF3B5D23AB@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.60.2 (3.60.2-2.fc44) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 2026-09-29 at 21:03 +0530, Toppr Tenali wrote: > I would like to suggest a clarification to the PostgreSQL documentation r= egarding base > backups and local WAL recycling. >=20 > The documentation explains separately that: >=20 > - archived WAL required by a base backup can eventually be deleted once t= hat backup > is safely archived I'd say that is wrong - you need to *retain* the WAL required to recover a = backup, otherwise you cannot restore it. Where in the documentation do you see tha= t sentence? > - WAL segments in pg_wal can be recycled or removed after they are no lon= ger needed > and, when archiving is enabled, have been successfully archived. Right, but you forgot that replication slots will also keep PostgreSQL from deleting WAL segments. > However, I could not find an explicit statement about whether taking or c= ompleting a > base backup itself affects when WAL segments in the local pg_wal director= y become > eligible for recycling/removal. >=20 > Could the documentation explicitly clarify this relationship?=20 I don't think that there is a relationship between WAL recycling and a base= backup, so there is nothing to document. Yours, Laurenz Albe