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.96) (envelope-from ) id 1wgggf-006Kon-2E for pgsql-admin@arkaria.postgresql.org; Mon, 06 Jul 2026 10:36:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wggge-00GngV-1S for pgsql-admin@arkaria.postgresql.org; Mon, 06 Jul 2026 10:36:28 +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.96) (envelope-from ) id 1wgggd-00GngN-3B for pgsql-admin@lists.postgresql.org; Mon, 06 Jul 2026 10:36:28 +0000 Received: from mail-yx1-xb130.google.com ([2607:f8b0:4864:20::b130]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wgggb-00000001oNA-3Hqb for pgsql-admin@lists.postgresql.org; Mon, 06 Jul 2026 10:36:26 +0000 Received: by mail-yx1-xb130.google.com with SMTP id 956f58d0204a3-664b3831a20so4042644d50.3 for ; Mon, 06 Jul 2026 03:36:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1783334185; cv=none; d=google.com; s=arc-20260327; b=npZo9U+8TkALjszcpYTaAe1I36B13NShPnABAzCglnxKOjf/8PLNOg9aBoIvLnbzu/ mxtCtTsbuiqa6Xtzks2BoPpVhnhq8tGiTdMErM8webgj/7x3QuSx7ZCu+Ho6AV2v1vJ2 LZtDAya7RWkpfg7oPRd7Eg9sCRm0p2ZpI+9gANjJZwBIUarAvtNR3R8LRFrXvJ4gZqis kHJ8ysLqOILPhjS0K5TtHxlO8Dlo08VQd8Q1hH1aSsYp25CZX/mu3ZM+pU66vOys0E3U kxI8Y3LU0KrNb2SH3IsesERC3hE/L0KQPiBXAPf9Mky8BjQWzJfSDXunqf3pXIcmdkL+ IrFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=QLnJetyW5LwtY/DQzCuu0vNzgaDrhO6qxVwT3Wyatuc=; fh=wdXGVzlufEJVTc6wMaMv0VsO7oswMxTqQBT0LXOkQhg=; b=Tetmr80Rgqdaoob9Y572UDYNmnteOfhM2S/Qy/4D9lJtkH0TxmrN33zNnX8d3nck50 VPyeKGjJ95zyjZDXkL23rhaer7W285u63huF+rqvYFBMoQ4TtwDq+7TRI6/BdAGhRCFD JGdrlosRmzHhML29+lyPa4q72H7npyFfPisxhMaaaFTatH/i6MwnUBGFXkSGctYXUUbI Akv5LfRu7I2S+yVlEixkt/1vZuqb25amKOwqMrWgsdV7+oY6DaauCrvjZFKI6mRNJKR6 lJETW4AMMUZ2KBG8PVmP/rSrfykA0N0HnAr6L+opEcRMPccZHb+Sj8sOAYDWua2DNker 2nHQ==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783334185; x=1783938985; 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=QLnJetyW5LwtY/DQzCuu0vNzgaDrhO6qxVwT3Wyatuc=; b=S6Q6AIDpOurFPU4quUhDx2eXdpu5eh1eUTox3HprohvSRuca8z0XrKVYA4tLqVWZZU INrVisck+86BHOeg78XsuWysvXtD4n92xZ7X66nk1UExQiwYO28zaNB/nZ4MlsqyYBGk V7bldaZCsD5dJ/vX5GEYY3E4NJvEE4O6xBzsqC0b8fUikbQjcuDXXlGdWSAW6QsCyYrG nqk+Xd1SorcULYtjDhLgyx6j0wrfq2nXHc6jNHUjBKOnb3iqpg9HmjPt8Rd5JgMNEK97 vsrqAZED0Nweu3kWl2mIRFUXU+kPjPlK4NTCHvNs7NKKvCxu+5c9kw5xsMjHgRH/DsO1 jJgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783334185; x=1783938985; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=QLnJetyW5LwtY/DQzCuu0vNzgaDrhO6qxVwT3Wyatuc=; b=r3JVxrtOJ+WsftzR3DTXbhRPxLCMZRq3OWmOX8m/14DTTO/idcUp2ctWCMF+QIh5CU V+eyq1OGJqVnOZZn0MDuHtXB1YMqOa8K6hXT3qG0urDgyQ38WQUcqXeG5XKJiC0ZHbtY Qa1RMp4T0bK8YYyM0OV07RhVkPIwYqB+SY72MHJgcWCU/MalRbme4aeYi9mN+3jCPsqT /B9MrY3EFpBaI/vyjMMIVTVJ36LOIlRKjn1IrSgAZFEJiB9TCoZDXzdcogBnEUTbR955 Ak8tb1c51dmUbj2LEXwwOuJ0NStEoooS3XBoyh/gUYNoimRAMyk4bIucNMEjkUIhfvhB ilDg== X-Gm-Message-State: AOJu0YxuqcdeuveKqDjioOK3sJx+impDL96NbgQtGDSpn6qyzAW4dlV6 Hqx4BO9orFIyIaqoosnI8gOysgraXxN2qkZFknf6DBRT2pcull+zDuDSSpRu0iEPuHLCCy7/d9O EvSz6z8ULVbRe97YlGgqYxJSKaShjgMU= X-Gm-Gg: AfdE7cmCEb7+bN5Ft9aAYn3kq7CdJS/1bvhTzIpYgHuTCnu4PcO+xQDp8aWdR6EQiIu fDUKyy5/Ir3I5Kw2kvZO/SkqQFe+CUa/nDbMgoExzWSSmmUv1d2ooMv+C9lXV9v/NhuGdO4fq+6 ip/xtyIrD0M/ygLASiY6R8x8foCbpqPMGZvRILF7dXV/cMR4Oprnt6uPsKr62NR7Ts3pruAKkBu 4n6fYwoGwcfgj7guTiuaUULoTtXlyz7so5TO0BPvYyOdjPrwlgCGFdGQ0PMQwdNyHyheSNy/yAY LsfjNoy9YMQTaf3YntUAzeWuouccTXFnpKKF1UhkuYCq707F+ARfo2Ocrk1SsUs= X-Received: by 2002:a05:690e:4842:b0:664:de27:9e13 with SMTP id 956f58d0204a3-6677fd1b0fbmr23753d50.73.1783334184825; Mon, 06 Jul 2026 03:36:24 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Mahesh Sathe Date: Mon, 6 Jul 2026 16:06:13 +0530 X-Gm-Features: AVVi8CdBuku7bybQAtPKszpRFw3U2ApnIp3cEPiZB745okPpdYYlyj-0JWDRAL4 Message-ID: Subject: Re: Major upgrade in patroni cluster To: Raj Cc: Pgsql-admin Content-Type: multipart/alternative; boundary="0000000000009a36000655eed87b" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000009a36000655eed87b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Raj, For a 3-node Patroni cluster with PostgreSQL 17.10, here is the high-level approach I typically follow for a major version upgrade to 18.4 with minimal downtime.High-Level Strategy 1. *Preparation & Testing*: - *Staging Environment*: Perform the upgrade on a staging cluster that mirrors your production setup. This is critical for validating application compatibility and performance. - *Release Notes*: Thoroughly review the release notes for PostgreSQL 18.4 to identify any breaking changes, deprecated features, or specif= ic collation/locale requirements that might impact your data. - *Testing*: Validate your pgBackRest backups and ensure you can restore from them before proceeding. 2. *Upgrade Execution (Minimal Downtime)*: - *Rolling Upgrade*: Utilize Patroni=E2=80=99s rolling upgrade capabi= lity. You can upgrade one replica at a time by stopping the Patroni service= , upgrading the PostgreSQL binaries, and restarting. - *Switchover*: Once the replicas are upgraded, perform a controlled switchover to promote an upgraded replica to leader. Finally, upgrade= the former leader. - *pg_upgrade*: In many cases, you may need to use the pg_upgrade utility. If you use it, ensure you run it with the -k (link) option where possible to significantly speed up the process and minimize downtime. 3. *Key Considerations*: - *OS/Library Compatibility*: Since you are moving to a newer PG version, ensure the underlying OS libraries (especially glibc) are compatible, as this can affect collation. - *PgBouncer/HAProxy*: Ensure your connection poolers and HA setup are correctly updated to point to the new binary paths if the installation location changes. - *Validation*: After the upgrade, run your application suite against the cluster to catch any performance regressions. Let me know if you=E2=80=99d like to discuss specific steps for the pg_upgr= ade process or how to handle the replication configuration changes. Best regards, Mahesh Sathe Sent from Gmail Mobile On Sun, 28 Jun 2026 at 9:53=E2=80=AFPM, Raj w= rote: > Hi All, > > I have a three node PATRONI cluster with postgres 17.10 version with > PGBACKREST, pgnouncer and haproxy. > > We would like to upgrade postgres 18.4 version. > > What are the high level steps with minimal downtime? Though I did some > research already, would like to understand how it's been followed. > --0000000000009a36000655eed87b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Raj,

For a 3-node Patroni cluster with PostgreSQL 17.10, her= e is the high-level approach I typically follow for a major version upgrade= to 18.4 with minimal downtime.High-Level Strategy
  1. Preparation &a= mp; Testing:
    • Staging Environment: Perform the upgrade on = a staging cluster that mirrors your production setup. This is critical for = validating application compatibility and performance.
    • Release No= tes: Thoroughly review the release notes for PostgreSQL 18.4 to identif= y any breaking changes, deprecated features, or specific collation/locale r= equirements that might impact your data.
    • Testing: Validate y= our pgBackRest=C2=A0backups and ensure you can restore from th= em before proceeding.
  2. Upgrade Execution (Minimal Downt= ime):
    • Rolling Upgrade: Utilize Patroni=E2=80=99s rolling = upgrade capability. You can upgrade one replica at a time by stopping the P= atroni service, upgrading the PostgreSQL binaries, and restarting.
    • = Switchover: Once the replicas are upgraded, perform a controlled swi= tchover to promote an upgraded replica to leader. Finally, upgrade the form= er leader.
    • pg_upgrade: In many cases, you may n= eed to use the pg_upgrade=C2=A0utility. If you use it, ensure = you run it with the -k=C2=A0(link) option where possible to si= gnificantly speed up the process and minimize downtime.
  3. <= b>Key Considerations:
    • OS/Library Compatibility: Since you= are moving to a newer PG version, ensure the underlying OS libraries (espe= cially glibc) are compatible, as this can affect collation.
    • PgBo= uncer/HAProxy: Ensure your connection poolers and HA setup are correctl= y updated to point to the new binary paths if the installation location cha= nges.
    • Validation: After the upgrade, run your application su= ite against the cluster to catch any performance regressions.
Let me know if you=E2=80=99d like to discuss specific steps for the <= code>pg_upgrade=C2=A0process or how to handle the replication config= uration changes.

Best regards,

Mahesh Sathe


Sent from Gmail Mobile

On Sun, 28 Jun 2026 at 9:53=E2=80=AFPM, Raj <rajeshkumar.dba09@gmail.com&= gt; wrote:
Hi All= ,

I have a three node PATRONI = cluster with postgres 17.10 version with PGBACKREST, pgnouncer and haproxy.= =C2=A0

We would like to = upgrade postgres 18.4 version.=C2=A0

What are the high level steps with minimal downtime? Though I = did some research already, would like to understand how it's been follo= wed.
--0000000000009a36000655eed87b--