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 1sCkEd-007nOR-Jf for pgsql-pkg-yum@arkaria.postgresql.org; Thu, 30 May 2024 18:10:45 +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 1sCkEd-0051a7-M5 for pgsql-pkg-yum@arkaria.postgresql.org; Thu, 30 May 2024 18:10:43 +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 1sCkEd-0051Zz-DB for pgsql-pkg-yum@lists.postgresql.org; Thu, 30 May 2024 18:10:43 +0000 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sCkEa-001Y47-P9 for pgsql-pkg-yum@lists.postgresql.org; Thu, 30 May 2024 18:10:42 +0000 Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-5755fafa5a7so1431522a12.1 for ; Thu, 30 May 2024 11:10:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717092639; x=1717697439; darn=lists.postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=OFXfvBGkc4lyXhc5AMFKMfuTSJL9gT99cDFro2iIGSY=; b=M9BIlpZrf44v3H06MQU6XjCj2vn0iSbiUNWPmPKXaNzjeZxY5eUzc9Grvw4oThjxQQ NvTNYtm4lOlo7QjaqTwu8jznTMyOHsF7BBfUZmPNo17MK3Xx0vKlZbFNv9es8DGueQ67 ttIVi3w9bZ7ib+z5JeIMgfqdNTkmf5J6g9LRew5RguI/cnJ40WHF84KP3CKiMS0MrsFi 9vHwUp0iexggmZnOK+hYOXcvxWFladf+mI3i9w/AVI1/o93SOzCsYmYkNXaSjdQl+PXQ Ri+sT3bGAABYX1WF8seW6hHDbPnPAK38iNS46rrY4gsVOwzE4AoWNxjN676xKBhfDHJs BUBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717092639; x=1717697439; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=OFXfvBGkc4lyXhc5AMFKMfuTSJL9gT99cDFro2iIGSY=; b=PGX8SiURdXCpuamxpNI0dNB/Z0CKF+qFZ4G1ghh6X+jcpbdvXm2QtHyq/VjURxCFAe r4L3VTppJ3i6W5e8EkdV1S4ll66EZ457VeVYPNjbtIKv+PWwdpwW8s9SS+tC0dt8peO8 p2sZqiBigupfoSdFuVWhZ1ge6tYMDfST/+YCl3/Jr/F4RwRtxcHYljObr3SaZkovWwZ7 L/tA/sJtauI0aOzGxFrQmbHWmv5lntSxkitLZNUtotZ1uwJ8uJQcTvBtCPg3AhZoIHpk W0foS04zNUZYNHGFAgVZqOqEwVIA55ZuErdFoK/U7ujTDWrU8ZZ0qhI0qYA3GwNTswPC QEJg== X-Gm-Message-State: AOJu0YyD0b4RjI+rW6/HpwMxATONqyI5D3X9HIuId7MO1Jt+vnQ5MVYf 2LaF+c1Xx0Vv2XSBSh1dTW7e7XxdCovroqvyddn8a+xO2EbXIy+t/MPOSHUkHC+YxrjsgVOWrEA yoknSR4CiVLxec+4/ZZv+4DZl9gkLeVga X-Google-Smtp-Source: AGHT+IENZCwan6HU5OFA8ZLfhencEewXPM3SfMxGKHmNxVX7PZDN4ysT2nhHB4OqAAxxmhuDxmGyQfXZvYSpmXafoNY= X-Received: by 2002:a50:9316:0:b0:579:c2fe:886 with SMTP id 4fb4d7f45d1cf-57a177b15b9mr1808392a12.14.1717092639428; Thu, 30 May 2024 11:10:39 -0700 (PDT) MIME-Version: 1.0 From: Zaid Shabbir Date: Thu, 30 May 2024 23:10:28 +0500 Message-ID: Subject: Remove Cluster forcefully during the check_upgrade failure To: pgsql-pkg-yum@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000d1d8df0619afc880" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000d1d8df0619afc880 Content-Type: text/plain; charset="UTF-8" Hello, I have installed PostgreSQL 15 and PostgreSQL 14 side by side and want to upgrade from 14 to 15. For upgrading purposes, I am using {postgresql-15-setup check_upgrade}. However, in my case, the installed 14 version is not compatible with the latest 15.7. After the installation and cluster initialization of PostgreSQL 14 and 15, when I run the following command {postgresql-15-setup check_upgrade}, it returns the following message: "Performing upgrade check: Upgrade failed. Removing the new cluster. Please re-initdb the new cluster. failed " After the failure the postgresql15 cluster removed forcefully due to the following code written in postgresql-15-setup script file { if [ $script_result -eq 0 ]; then echo $"OK" else # Clean up after failure echo "Upgrade failed. Removing the new cluster. Please re-initdb the new cluster." * rm -rf "$PGDATA"* echo $"failed" fi } My concern here is whether forcefully deleting the user cluster without obtaining permission from the user is the right approach. Regards, Zaid Shabbir AGEDB --000000000000d1d8df0619afc880 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,

I = have installed PostgreSQL 15 and PostgreSQL 14 side by side and want to upg= rade from 14 to 15. For upgrading purposes, I am using=C2=A0{postgresql-15-setup check_upgrad= e}. However, in my case, the installed 14 version is not compatible = with the latest 15.7.

After the installati= on and cluster initialization of PostgreSQL 14 and 15, when I run the follo= wing command=C2=A0= {postgresql-15-setup check_upgrade}, it returns the following messag= e:

"Performing upgrade check: Upgrade failed. Removing the ne= w cluster. Please re-initdb the new cluster. failed "


After the failure the postgresql15 cluster removed forcef= ully due to the following code=C2=A0written in=C2=A0postgresql-15-setup scr= ipt file

{
if [ $script_result -eq 0 ]; = then
=C2=A0 =C2=A0 =C2=A0 =C2=A0 echo $"OK"
=C2=A0 =C2=A0 e= lse
=C2=A0 =C2=A0 =C2=A0 =C2=A0 # Clean up after failure
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 echo "Upgrade failed. Removing the new cluster. Plea= se re-initdb the new cluster."
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 rm -rf "$PGDATA"
=C2=A0 =C2=A0= =C2=A0 =C2=A0 echo $"failed"
fi
}

My concern here is whether forcefully deleting the user cluster without = obtaining permission from the user is the right approach.



Regards,
Zaid Shabbir
AGEDB

--000000000000d1d8df0619afc880--