Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p9po9-0001lb-V8 for pgsql-general@arkaria.postgresql.org; Mon, 26 Dec 2022 15:54:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p9po7-00067D-LX for pgsql-general@arkaria.postgresql.org; Mon, 26 Dec 2022 15:54:31 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p9po7-000673-7W for pgsql-general@lists.postgresql.org; Mon, 26 Dec 2022 15:54:31 +0000 Received: from mail-qt1-x830.google.com ([2607:f8b0:4864:20::830]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1p9po0-0003vF-EG for pgsql-general@lists.postgresql.org; Mon, 26 Dec 2022 15:54:29 +0000 Received: by mail-qt1-x830.google.com with SMTP id a16so8658422qtw.10 for ; Mon, 26 Dec 2022 07:54:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=h4rQXT4vJ6TuVJUarKRRVixFSFkIBagaYSRiP230Kis=; b=qle9l69ObmZoU6k5DqAXypuqsw8kBfwnVE+t0dlAPFdQDk55erTVBXoBq6GYwO6tSr iMhQ/7MiWmmujCLu+lnhehD7tBARM3UD6H6R2SpC06/P1cRV1gbjBdOTYS0vzT70H91m bcIiFcvrwRz/l2Ow9X3Ia4ktHhniEK4q6ZpUcT2rpXzeiBVr0vkJd+3XePAjRz/YjyNI RUgnWyM4SdcXamsq66uuuPxKYTIa3jlSs57X4EPBPy7XUQIghtY7h4lhMPnYpVGiZEWv ad0EtHnK3s4oCB7HXNu1c9wo/veV2DkYt1FLsVFafjn8iugPEP2auFlMv1Ljq+q0LYTl kVTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=h4rQXT4vJ6TuVJUarKRRVixFSFkIBagaYSRiP230Kis=; b=YG1L+mPCMylIUVA74WfdhP47wPFkXNDIgBSDo8Vy6abxTcXE7UpTlW4QB/JbN5hNKQ Qg4pvIhXJVvM2y/QtXrLuIJBL+gt9CaepV2f3doXLdMkYgISiy3Xg8tzM2j+uOg3oT1w tmQfExxco3miWodKirh0+dlqwLDXHLtFG3G7+LicLwQt+6q+yHo3Hs+xmtMYS77ROtwr b0uGIEsf/YgQqvzffIr3Z31JT2Dw8jFPDcvfmy/yJo9VzZQHHPp8xqNSp0T+y9q/UgIy DQ+VzNun6xK7uKb6zgwDBnW/lYPS19aPwd6FxLFrsuR//1Nr6bGUMjiuvzLFRcgBdoFu ZSOg== X-Gm-Message-State: AFqh2kqM9fD5arRhN9bYNnWLR1gftiUGjvoB/8HbRDsk4MrOyH9IFBF/ 7kc/I0qcF4kk+dX71iXD2Zz8ZqnqDow= X-Google-Smtp-Source: AMrXdXsqhcQMXNQmy4C2TDbW7qDmoR2q24+OmBMHL5QSGOUff+cCGJj6KsfVss8gQX/zhg9IZfFRyg== X-Received: by 2002:ac8:6685:0:b0:3a8:123a:b549 with SMTP id d5-20020ac86685000000b003a8123ab549mr27614433qtp.46.1672070062315; Mon, 26 Dec 2022 07:54:22 -0800 (PST) Received: from [192.168.1.66] (108-250-206-84.lightspeed.nworla.sbcglobal.net. [108.250.206.84]) by smtp.googlemail.com with ESMTPSA id w26-20020a05620a095a00b006fc6529abaesm7764514qkw.101.2022.12.26.07.54.21 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Dec 2022 07:54:21 -0800 (PST) Content-Type: multipart/alternative; boundary="------------1yOd03iY4ifzxOj3IZPTQycm" Message-ID: Date: Mon, 26 Dec 2022 09:54:20 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: best practice to patch a postgresql version? Content-Language: en-US To: pgsql-general@lists.postgresql.org References: From: Ron In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------1yOd03iY4ifzxOj3IZPTQycm Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Just downgrade the packages if you need to revert to a previous version. Remove the 14*.5* package, and install the 14*.4* package (because no one's crazy enough to start with 14.0 in December 2022).  You'll have to explicitly specify the version number. On 12/26/22 03:29, qihua wu wrote: > We are planning to use postgresq on production, but there is one question > about how to patch a db. We don't want to overwrite the old version > directly, so that we can rollback if the new version has issues.  So we > want to install it a different location such as /home/postgres/14.1 for > version 14.1 (all binary should be under 14.1 or sub-fold of 14.1) and > /home/postgres/14.0 for 14.0, in this way we can easily switch between > different versions. But apt install on ubuntu doesn't have the option for > a customized location. So what's the best practice to patch postgres? -- Born in Arizona, moved to Babylonia. --------------1yOd03iY4ifzxOj3IZPTQycm Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit Just downgrade the packages if you need to revert to a previous version.

Remove the 14.5 package, and install the 14.4 package (because no one's crazy enough to start with 14.0 in December 2022).  You'll have to explicitly specify the version number.

On 12/26/22 03:29, qihua wu wrote:
We are planning to use postgresq on production, but there is one question about how to patch a db. We don't want to overwrite the old version directly, so that we can rollback if the new version has issues.  So we want to install it a different location such as /home/postgres/14.1 for version 14.1 (all binary should be under 14.1 or sub-fold of 14.1) and /home/postgres/14.0 for 14.0, in this way we can easily switch between different versions. But apt install on ubuntu doesn't have the option for a customized location. So what's the best practice to patch postgres?

--
Born in Arizona, moved to Babylonia.
--------------1yOd03iY4ifzxOj3IZPTQycm--