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 1sH9C8-003sc5-K8 for pgsql-general@arkaria.postgresql.org; Tue, 11 Jun 2024 21:38:21 +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 1sH9C7-00AOI0-4s for pgsql-general@arkaria.postgresql.org; Tue, 11 Jun 2024 21:38:20 +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 1sH9C6-00AOEs-MJ for pgsql-general@lists.postgresql.org; Tue, 11 Jun 2024 21:38:19 +0000 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sH9C4-000r0B-R3 for pgsql-general@lists.postgresql.org; Tue, 11 Jun 2024 21:38:18 +0000 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-52bbdc237f0so2062045e87.0 for ; Tue, 11 Jun 2024 14:38:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718141894; x=1718746694; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=1ETYAgg9EgVk22w7OHG3HonRwcQz66IFU2fXsDGod4Q=; b=nZ4oDsQ7nLaUg6GWIDHf5qQPeKu51xPcEjQZwi0obvhuxnaXst/d9wHY0jW9DWxQ6S NkfLXamKyCgdkbNoWyO46mQl2KlXsATGBnZ7skFPS/kAklx7EdJU3SVvaPefimE33gH2 zMj8WeCl8opAzRGrHY8xhJCKMVSDOtIljxlWuZtOLquWSGgvcZc+bz5yNjBiG30rDCFu 9z/ektKqm4KUsw+Pb/RxomYPCsX5bK4CoDyV56QL+d7iBHn2Oz9gxa4PJmByS41PZKSJ /viOaOHs2powPwKlW/nM5Elxs448v8kG1hq6Lcy1x/XLTOeCLYXIN2arMpJnXZY2NBub rLPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718141894; x=1718746694; h=cc: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=1ETYAgg9EgVk22w7OHG3HonRwcQz66IFU2fXsDGod4Q=; b=YXZ/7oR7Aa7DzXuFHJ6Aqr7MiaEJIQ8LMjqIWF1D9dtOTdyJc02/DJJsxEWdEFEDVp gOhcgc6r0nbxq4KqT7ZREx3opRCv2IBCznazRQfxnEuVlFi3A5+7/P0pBE8S0xRwGBiA 1+eLzR0H1iugk7fPFC+bsNH5Cx8dmR09l2w71+WXplvnmHpspZp/CvzyyhUSj/4QHAKQ LuGwCwyOJbZCBX+/5DzkC6xSkwyvH97iLxYRckDKWe3mhuJvXIigx3s80bAljtTa956R SaZUCKv3px+XKDzje6hrFGL+NHnUIvFv6NQlleB/PJrXMdni2KBQMu+P9DSDtPDrKEL2 aZHw== X-Gm-Message-State: AOJu0YzFX9Z5Q57LzWp1tR4kD4+WZ27i/1wr3SiGmqpZs1m2BSPvHufS 2ae5wCqTJgy4K3z6p6SH/7b6lw4thpRG16JvimBCGH0oP0o1rD0T6Bwa8bI1nrwNhvtfJSkPfDU 3aBvgzrf+cSj1DpvS3DP0s6bxbVL01ZF+ X-Google-Smtp-Source: AGHT+IELyX6j35OuyoVKIIrc6MQNS47zOlE4mkOp8bAkFLsJ6RJI3WetlHppgjBd7Eqh5q9rFui5zNQhIpieEzw73DA= X-Received: by 2002:ac2:5a01:0:b0:52b:c09e:407a with SMTP id 2adb3069b0e04-52bc09e414amr9068897e87.47.1718141893968; Tue, 11 Jun 2024 14:38:13 -0700 (PDT) MIME-Version: 1.0 References: <1628637f-419f-4f6a-9cb6-07af90cd0bc4@aklaver.com> <1c0273f5-a90a-48f6-b51f-fe15c16fa1c6@aklaver.com> <490e8a5c-f1f5-40fe-8243-f1c8c18d03f2@aklaver.com> In-Reply-To: From: Koen De Groote Date: Tue, 11 Jun 2024 23:38:02 +0200 Message-ID: Subject: Re: Questions on logical replication To: Adrian Klaver Cc: PostgreSQL General Content-Type: multipart/alternative; boundary="000000000000438dc1061aa415b5" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000438dc1061aa415b5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > Have you looked at pg_upgrade?: I have, but I want to keep downtime to a minimum and from my understanding the switching of a fully synced logical replica only requires updating your sequences. Which should be possible in less than 60 seconds. > 1 GB each? Yes, each. Roughly around there. On Sat, Jun 8, 2024 at 7:46=E2=80=AFPM Adrian Klaver wrote: > On 6/8/24 10:40, Koen De Groote wrote: > > What I'm trying to do is upgrade a PG11 database to PG16, using logical > > replication. > > Have you looked at pg_upgrade?: > > https://www.postgresql.org/docs/current/pgupgrade.html > > > > > The PG11 has an active and a standby, there are a handful of databases. > > On particular one has a few tables just over 100GB, then a few 100 > > tables near 1GB. > > 1 GB each? > > > > > What I'd do is start a publication with no tables and add them 1 at a > > time, refreshing subscription each time. > > > > This might take a long time, so my main questions relate to potential > > network issues or various situations where the instance receiving the > > logical replication, suddenly stop being able to receive. > > > > Resyncing, and the effects of WAL buildup, are my main concern. > > > > Accidentally sent a mail to only your email, sorry for that. > > > > Regards, > > Koen De Groote > > -- > Adrian Klaver > adrian.klaver@aklaver.com > > --000000000000438dc1061aa415b5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> Have you looked at pg_upgrade?:
<= br>
I have, but I want to keep downtime to a minimum and from my = understanding the switching of a fully synced logical replica only requires= updating your sequences. Which should be possible in less than 60 seconds.=

>=20 1 GB each?

Yes, each. Roughly around there.


On Sat, Jun 8, 2024 at 7:46=E2=80=AFPM Adrian Klaver= <adrian.klaver@aklaver.com= > wrote:
= On 6/8/24 10:40, Koen De Groote wrote:
> What I'm trying to do is upgrade a PG11 database to PG16, using lo= gical
> replication.

Have you looked at pg_upgrade?:

https://www.postgresql.org/docs/current/pgupgr= ade.html

>
> The PG11 has an active and a standby, there are a handful of databases= .
> On particular one has a few tables just over 100GB, then a few 100 > tables near 1GB.

1 GB each?

>
> What I'd do is start a publication with no tables and add them 1 a= t a
> time, refreshing subscription each time.
>
> This might take a long time, so my main questions relate to potential =
> network issues or various situations where the instance receiving the =
> logical replication, suddenly stop being able to receive.
>
> Resyncing, and the effects of WAL buildup, are my main concern.
>
> Accidentally sent a mail to only your email, sorry for that.
>
> Regards,
> Koen De Groote

--
Adrian Klaver
adrian.klave= r@aklaver.com

--000000000000438dc1061aa415b5--