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 1tFGD2-00CAYX-5c for pgsql-general@arkaria.postgresql.org; Sun, 24 Nov 2024 17:15:44 +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 1tFGD0-008tkK-Ki for pgsql-general@arkaria.postgresql.org; Sun, 24 Nov 2024 17:15:42 +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.94.2) (envelope-from ) id 1tFGD0-008tkB-8K for pgsql-general@lists.postgresql.org; Sun, 24 Nov 2024 17:15:42 +0000 Received: from mail-ot1-x32a.google.com ([2607:f8b0:4864:20::32a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tFGCy-003cx3-9S for pgsql-general@postgresql.org; Sun, 24 Nov 2024 17:15:41 +0000 Received: by mail-ot1-x32a.google.com with SMTP id 46e09a7af769-71d50b89132so1786a34.2 for ; Sun, 24 Nov 2024 09:15:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732468538; x=1733073338; darn=postgresql.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=TGtbKPI2JDJT+OAmNfLBa+5HNTvp7rv8/PghiJbISh8=; b=dyBVQ57Zme+iTujw7sLx+cqM+2RPbxsV3zNoleVm2RXkbmcP4oBMxY8/JC9ING/7Al KqBXMCvvQSaw8hsBJVCz7E8FV7LcdOYYu9j7z74+EQGF3kx+EjKgSFc69wloOFgIAKrQ fs27+DCb6YIU0EyLjP/RyxTU81DNYYXMATX9x69O1oALNLDC2ONyEjSSOMqJvg3h68Uu 8b2Lo2A9KzjP/atDKshq2zz3PRUwW58cBUseDLB4uSID4U1WRjHs8oalyWu+DcsMyDzt aFzagxKAQmQRRkdmkOHO1PMvm8ZTWh7wDWMh6HVD5hagMnojwTNuwghdU9SjAi6ZuS/o QI1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732468538; x=1733073338; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=TGtbKPI2JDJT+OAmNfLBa+5HNTvp7rv8/PghiJbISh8=; b=wr4WpffzdDMMnYhih/OVUnZlvi7dAuR/x1kam+AyswMaHeX5rk3aJOJf9UkDpgdDcg HXm/0rhQSGZ5h+WdBLsU62ML2CNelVRWOclM+c7HXZ5+J/rSdt8mrxchs+487y4lYF/o oHkRTjsvwKUB2i/SqMRjW3t9oewIDnNiPwIbzqDco4U8V97MJywcwTsaLGqXjjfJGQCx EuWun76JgYe3pAOQ8iWI1JTS9Gg+puPCD/IbM7lfp6TDhUSXOlNZJqoRrsbIMBG9dZ85 cUY3ksK3SHiebag8TrEpJsgJfkViref6airjDcHNRfXEx2Tibd4e6X3tfzYUHRXkrVJ5 cbBQ== X-Gm-Message-State: AOJu0Yzb5sEorsjR/uuAnXRnUGPbLxe6H2MNoY3teefcMa/8hCUNY/Qr /CFi+swQr2wJYWRINwKd320aXQSq0OsCgu5XiK7btO8wa7+S0TBgyG/9JAePs5rClBMdkYsxULp jNtDRm6daH1yezqBhCccidy0eqiU2kA== X-Gm-Gg: ASbGncuyPTbtARSfkMxs1ZaIl3Y3TV20wKx+BnbVxmlvZIjrNGPjKnDBtTLMHCqOTVD dsMrhtHib+A5ZVxwTVpWCOdTCdeICP0uifIREZsqUxieAs6J4Qv5YqhqHNoYpHAULQQ== X-Google-Smtp-Source: AGHT+IEJDcafIu9D0EWlDB98bkl+D/6hAVCBORwP5LnmNxNaPQSoAqTU0gAevZjHIkULF74hyx/6j/HaUL6cIg5lv2A= X-Received: by 2002:a05:6830:6e16:b0:718:19b6:775c with SMTP id 46e09a7af769-71c04b73b96mr10177182a34.12.1732468538239; Sun, 24 Nov 2024 09:15:38 -0800 (PST) MIME-Version: 1.0 References: <6c498f0e-64f9-449a-9b90-5cd72d00e2ef@aklaver.com> <2a7d96ac-83a7-4ddc-a3ce-9c637f2c1c76@aklaver.com> <1FBD217B-06FE-48CF-AA58-F7ADEDA5ADD2@thebuild.com> In-Reply-To: <1FBD217B-06FE-48CF-AA58-F7ADEDA5ADD2@thebuild.com> From: Ron Johnson Date: Sun, 24 Nov 2024 12:15:27 -0500 Message-ID: Subject: Re: Questions on Upgrading PostgreSQL from 15.0 to 15.9 and Setting Up Streaming Replication To: pgsql-general Content-Type: multipart/alternative; boundary="000000000000ce727c0627abc35b" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000ce727c0627abc35b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Nov 24, 2024 at 12:06=E2=80=AFPM Christophe Pettus wrote: > > On Nov 24, 2024, at 09:03, Subhash Udata wrote= : > > When we shut down the standby, upgrade it, and then start it back up, > will the replication automatically resume from the primary to the standby= ? > > Assuming that the standby has access to any WAL generated during the > shutdown (either still in the primary's WAL directory, or via an archive > using archive_command), yes. If you are not using a WAL archive using > archive_command, you will want to make sure your wal_keep_size parameter = is > set high enough that required WAL segments aren't recycled during the > standby's downtime. Doesn't the existence of a replication slot force PG to retain WAL files when replication is broken? --=20 Death to , and butter sauce. Don't boil me, I'm still alive. lobster! --000000000000ce727c0627abc35b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sun, Nov 24, 2024 at 12:06=E2=80=AFPM = Christophe Pettus <xof@thebuild.com<= /a>> wrote:
> On Nov 24, 2024, at 09:03, Subhash Udata <subhashudata@gmail= .com> wrote:
> When we shut down the standby, upgrade it, and then start it back up, = will the replication automatically resume from the primary to the standby?<= br>
Assuming that the standby has access to any WAL generated during the shutdo= wn (either still in the primary's WAL directory, or via an archive usin= g archive_command), yes.=C2=A0 If you are not using a WAL archive using arc= hive_command, you will want to make sure your wal_keep_size parameter is se= t high enough that required WAL segments aren't recycled during the sta= ndby's downtime.

Do= esn't the existence of a replication slot force PG to retain WAL files = when replication is broken?

--
Death to <Redacted>, and butter sauce.
Don't boil = me, I'm still alive.
<Redacted> lobster!
=
--000000000000ce727c0627abc35b--