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 1tNYvj-000dCJ-57 for pgsql-admin@arkaria.postgresql.org; Tue, 17 Dec 2024 14:52:11 +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 1tNYvi-002RkJ-HN for pgsql-admin@arkaria.postgresql.org; Tue, 17 Dec 2024 14:52:10 +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 1tNYvi-002RkB-4V for pgsql-admin@lists.postgresql.org; Tue, 17 Dec 2024 14:52:09 +0000 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tNYve-000Cd2-QX for pgsql-admin@lists.postgresql.org; Tue, 17 Dec 2024 14:52:09 +0000 Received: by mail-pg1-x52d.google.com with SMTP id 41be03b00d2f7-7feb6871730so3657321a12.2 for ; Tue, 17 Dec 2024 06:52:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734447125; x=1735051925; 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=4b6J9aM+Pb/e8Bf8hkmXYh3rzrtcx5hvBLeAdlUxG9A=; b=GN5cuZ+pEKLpr2OWiLxyy/y46w2wozEh83jQELnRtxnQP3bz1PyynUPBEolXrIkITZ HfiQ6eBD13xDdrtOduLW1nouDFk3M5iLa6ayeKccs5A6Dszw2LPWXdOgPxV7S4fm/OCv gzUHi0PmIZfBEzV3iyYz7jLw6+azn4H57bCNdFPJ3K0oeu8PminFJBd4eaCb/+1ImjxG aLXVTjEyZK/ye5hjMresgL0cKBhqhl9+IL0jBn9k9A2sl6L2ExcTCB+1Lr7oPg0pn/K0 OGppYX3yRXJ9sRiUL+PxJ7sWcOZqaFNh+2Um+HPq6DGIe+KkqaXnN0UycKYUiuB0xmGM Zi2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734447125; x=1735051925; 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=4b6J9aM+Pb/e8Bf8hkmXYh3rzrtcx5hvBLeAdlUxG9A=; b=stXr8HKMvah+9Xj502xk5Xu/01XeaYxtgIdJKWj2Z6QnSjyKpPbw85c2XI7suYuSmv 5e0+TJPYl6dcFrVdG/QdldZR7FpgT767kHJF6AOxL6a8fsaZFmbUG07vZOPQaM+I/oI8 GQCYhRefKIKVrz1USmdQzUC8+3jk8/xKQn8V+oegBQOsKc9g+BfETbFAdfmAddxWe0ml RG/kxOBDyX+0gWmwAIr6h+wxs1UDtwIVsXbUWGfUdSyC5YiywkNvhXCjDxTDLNrTREue mRJ1YsduYEKGASX/ub4wJ6IhMnGzyYyRIRLoZniUNpKNN7oMXf/95/VVG3dBqgw6/eyj 1bfA== X-Gm-Message-State: AOJu0YyXJzHu/yYBnRv3zhcHd7PN9wbyL4ZW14mBMzIxv957VmBvLala jl4+CSTjoZJbkiH5h+DuZmAl1aGFGa9MfTr6QJ3Zbl+cERldixigxPSC3xFGkSgYcJAYeNOPlrw pwkSbXHdKy4mNehzLWgdaS+5g/y4u1A== X-Gm-Gg: ASbGncsyrcldPMLW2hf+6ZB1n7x2HGieW5otOJFhIzKc/YnRGa02N38Por9zMubOhAz JHi/utUzWGpyIe0wBSxWqW+P88qIPdWTLv8wvDG3Z X-Google-Smtp-Source: AGHT+IGREFuFuEPI+fetpXoajIzLgLazCEe5jgpsAOsf/e0CUimohTwiJDmwK0UOa5pqi9199uvUFILInQQRQzrgSlY= X-Received: by 2002:a17:90b:5544:b0:2ef:316b:53fe with SMTP id 98e67ed59e1d1-2f28fd6f5eemr20550626a91.22.1734447125243; Tue, 17 Dec 2024 06:52:05 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Motog Plus Date: Tue, 17 Dec 2024 20:21:54 +0530 Message-ID: Subject: Re: Postgres upgradation To: Ron Johnson Cc: Pgsql-admin Content-Type: multipart/alternative; boundary="000000000000c83465062978701a" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000c83465062978701a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Ron, Is it advisable to use pg_dumpall to take backup and psql utility to restore so that along with data(multiple DBs) roles, tablespaces if any are also copied and then restored. On Tue, Dec 17, 2024, 20:11 Ron Johnson wrote: > On Tue, Dec 17, 2024 at 5:21=E2=80=AFAM Narendran .j > wrote: > >> Hello All, >> >> In our environment, PostgreSQL is currently running on lower versions, >> ranging from 9 to 11. >> > > PG 9.x is presumably running on an EOL version of the OS, meaning you'll > migrate to a current version of the OS. That means you'll use > pg_dump/pg_restore OR Logical Replication, instead of pg_upgrade. > > You should probably do the same on the server running PG 11. > > >> We are planning to upgrade to the latest version, and I have a few >> questions regarding the process. >> >> What are the key considerations or checks we need to perform before the >> upgrade? >> >> Can we directly upgrade from version 9 to 15, or is a step-by-step >> upgrade required? >> > > Read https://www.postgresql.org/docs/current/app-pgdump.html and > https://www.postgresql.org/docs/current/app-pgrestore.html > > > > >> How should we handle extensions during the upgrade process? >> > > Depends on the extension, and how you install Postgresql. Since we > install from RPM packages, it was as simple as installing the latest > versions of those packages, and then running pg_restore. > > >> What challenges or issues should we anticipate during or after the >> upgrade? >> > > You might need to update db drivers like JDBC at the same time. > > >> If anyone with experience in upgrading Postgres, please share your >> guidance. >> > > Since pg_dump can be performed online, test the process beforehand. I'd > bet that your app servers are also running on old servers, too. Upgrade > them, and you'll have a perfect chance to test the system beforehand. > > The only hiccup we faced when moving from PG 9.6 to 14 was that the > updated JDBC drivers on the application servers choked on some strings wi= th > quotes in them. > > YMMV. > > -- > Death to , and butter sauce. > Don't boil me, I'm still alive. > lobster! > --000000000000c83465062978701a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Ron,

Is i= t advisable to use pg_dumpall to take backup and psql utility to restore so= that along with data(multiple DBs) roles, tablespaces if any are also copi= ed and then restored.

On Tue, Dec 17, 2024, 20:1= 1 Ron Johnson <ronljohnsonjr@= gmail.com> wrote:
On Tue, Dec 17, 2024 at 5:21=E2=80=AFAM Narendran= .j <jnarendran3@gmail.com> wrote:
He= llo All,

In our environment, P= ostgreSQL is currently running on lower versions, ranging from 9 to 11.

PG= 9.x is presumably running on an EOL version of the OS, meaning you'll = migrate to a current version of the OS.=C2=A0 That means you'll use pg_= dump/pg_restore OR Logical Replication, instead of pg_upgrade.
You should probably do the same on the server running PG 11.
=C2=A0
We are planning to upgrade to = the latest version, and I have a few questions regarding the process.
=

What are the key consideratio= ns or checks we need to perform before the upgrade?
=
Can we directly upgrade from version 9 to 15, o= r is a step-by-step upgrade required?


=C2=A0
How should we handle exte= nsions during the upgrade process?

<= div>Depends on the extension, and how you install Postgresql.=C2=A0 Since w= e install from RPM packages, it was as simple as installing the latest vers= ions of those packages, and then running pg_restore.
=C2=A0
=
What challenges or issues should we anticipate during or after t= he upgrade?

You might need to u= pdate db drivers like JDBC at the same time.
=C2=A0
If anyone with experience in upgrading Postgres, please share your guida= nce.

Since pg_dump can be perfo= rmed online, test the process beforehand.=C2=A0 I'd bet that your app s= ervers are also running on old servers, too.=C2=A0 Upgrade them, and you= 9;ll have a perfect chance to test the system beforehand.

The only hiccup we faced when moving from PG 9.6 to 14 was that the= updated JDBC drivers on the application servers choked on some strings wit= h quotes in them.

YMMV.

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