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 1v78Se-00FRfX-Ut for pgsql-general@arkaria.postgresql.org; Fri, 10 Oct 2025 08:26:49 +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 1v78Sc-00Ayfy-Ij for pgsql-general@arkaria.postgresql.org; Fri, 10 Oct 2025 08:26:47 +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 1v78Sc-00AyfV-37 for pgsql-general@lists.postgresql.org; Fri, 10 Oct 2025 08:26:47 +0000 Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1v78SX-0010Y3-2n for pgsql-general@lists.postgresql.org; Fri, 10 Oct 2025 08:26:44 +0000 Received: by mail-pg1-x536.google.com with SMTP id 41be03b00d2f7-b62e7221351so1532929a12.1 for ; Fri, 10 Oct 2025 01:26:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jprotech-com-vn.20230601.gappssmtp.com; s=20230601; t=1760084799; x=1760689599; darn=lists.postgresql.org; h=content-transfer-encoding:to:subject:message-id:date:from :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=yk5vBV9apOtsQbE/8L2y4cipBMmLwBNjNAsb8DQu/bM=; b=KADo5qD3gVNQ2SYZFVuKe0KlILKZQ3VgG+OiOnZH3JuTv1UVfWIfWgdZqvB36sYXYp SiwVZ1ZHcUjk4i/iyMNRIgnmHWlDUXXjb1t0SueAOmC81myD4H8Ds76dSqcBzl2djdZ9 e5BU6DUCBc+ruXItkQwLpNr6S5v56o+coW7hEdBwOqj1VB9h2Hb1I02gobCK8R/2w034 VRr9rxXRtYAdT6ghXvoF250NsnJDoKuiQVFbwvG/unJGraeie7G/S+8q/6N0iOEWoRqY e7wS1rCQdncW9vrgCm29ukyfBDvDMCL9izhASVIPjjzo96/geSM+YhKcyl1BoCosN/J9 P9kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760084799; x=1760689599; h=content-transfer-encoding:to:subject:message-id:date:from :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yk5vBV9apOtsQbE/8L2y4cipBMmLwBNjNAsb8DQu/bM=; b=eA2XCMrgMgkJ3CQfpu7uZJHzQMKSkGtJ4UzMmpeXbj0mAbx6RlEIQWenz7TxpdqezN D/hEzF4VedEpmGktNMgOTK8B/axdmsiWNKieNJCiaBdOhfIQzES767fM0qygKT7+X+bp 99B/g3aFk01urzneYC8gjREEL8lWn+HHld4a5GcRPhH7+9oLiXLgFTOoW0w6pnKoNFTR JpZwZM3is1AzoT50ztyTgiaFCm0ja+e2dVzsSNx0VrPjGdAofLiO4oWOfSooRwRMI1tG 5S4Xkb6bXOUYTbWmxpzdJFRMzpioUu/3fhJMlNbJJTMHNxcdlAEuG5mdFb3AKEnXZ+AM 1+IQ== X-Gm-Message-State: AOJu0Yy5Ex3QjBDUlP4O2CDl5N54txPYGXVCgGm2IQilCxjgT40JYSl3 K8IANcJoxG52KsWPGOyWgyJ46MoAFqMYOccOqjqZsseZTpnkTZfogvSi2In1biIX1ByoelssQrD WksyRYE3sZ2stBRCMlKO4xFranJvxPEpHRKdOXy8J3I3Valm96agLHITkog== X-Gm-Gg: ASbGncsdWxXxp+nyZJ7KaYb2Eqzs+q6qRn8u4V2shiFxb8qMW5Vu14qWlgfAlCXFo7u zwhYz404Is3DNQmdHTFSW0YiB2Jr8WRsXl+Fz3MqY/NnR+cdETE43sUCXx9rRxeHPbPWeZM8mI7 1OHJQOW0QSNGrq289JFMMiZjoBsw63hM6yfX/5FJXPAy32etOYHrI74TzGV+T9xhmhqDJw3eaqW M05WPwa4qB8cjeWzU5345N+pPA= X-Google-Smtp-Source: AGHT+IF23dNa0Ybc/W5eLMQPqhVfOAAuKInignIFYxKCaaZ5hWdSoTrLk3OWQgyhPF7TL2gmQCfBuxqSs9MvFEVPPvE= X-Received: by 2002:a17:903:384f:b0:24c:cb60:f6f0 with SMTP id d9443c01a7336-29027317be7mr120947225ad.58.1760084798556; Fri, 10 Oct 2025 01:26:38 -0700 (PDT) MIME-Version: 1.0 From: "Vu Le (JData - HN)" Date: Fri, 10 Oct 2025 15:26:28 +0700 X-Gm-Features: AS18NWDcjocLL-VhFLYm4tdTHixKDDPYH13CM-usRln0AHHuZU8lvPLO5iXC49k Message-ID: Subject: =?UTF-8?Q?Upgrade_=26_Rollback_plan=3A_My_customer_requests_rollba?= =?UTF-8?Q?ck_via_old=2Dversion_standby_=2813_=E2=86=94_17=29_=E2=80=94_need_community_ad?= =?UTF-8?Q?vice?= To: pgsql-general@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi all, I'm currently planning a major version upgrade from PostgreSQL 13.x to 17.x in a production environment. My customer has requested the following rollback approach, and I=E2=80=99d like to confirm if it=E2=80=99s technically feasible or advisable before proceeding. Scenario: 1. They have a **Primary=E2=80=93Standby setup** (streaming replication). 2. Their idea is to **upgrade only the Primary** (to v17) first, while keeping the **Standby** on v13 (the old version). - The upgraded Primary will run read/write traffic for about a week to validate stability. - If any serious issue occurs, the plan is to **switch over** (promote the v13 Standby), adjust IPs, and resume operations there =E2=80= =94 minimizing downtime. 3. They also asked whether it=E2=80=99s possible for **data generated on th= e v17 Primary** to still be **replicated back to the v13 Standby**, so that rollback would be fast and without data loss. Constraints: - They **cannot use a Blue/Green or clone-based approach**, because of **limited storage resources**. - They also doesn=E2=80=99t want the old data directory to become outdated (they expects it could stay in sync with the upgraded node). - They only have **UAT and Production environments** (no dedicated Staging)= . Questions: 1. Is there **any supported or practical method** to replicate data *backward* (from PostgreSQL 17 to 13) =E2=80=94 even temporarily, for rollb= ack purposes? 2. If not, what are the **recommended real-world rollback strategies** for a low-downtime upgrade under these constraints? 3. Are there open-source tools or logical replication setups (e.g., pglogical, Bucardo, etc.) that could safely achieve something similar? Any insight, best practice, or reference architecture from the community would be very helpful. Thank you for your time and guidance. Have a good day! --=20 Best Regards, Miles Le | Vu (Mr.)