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 1qlX01-003DXU-OM for pgsql-admin@arkaria.postgresql.org; Wed, 27 Sep 2023 16:02:53 +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 1qlWzz-000s4G-77 for pgsql-admin@arkaria.postgresql.org; Wed, 27 Sep 2023 16:02:51 +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 1qlWzy-000s3p-RJ for pgsql-admin@lists.postgresql.org; Wed, 27 Sep 2023 16:02:51 +0000 Received: from mail-yw1-x1135.google.com ([2607:f8b0:4864:20::1135]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qlWzw-006xDu-Oc for pgsql-admin@lists.postgresql.org; Wed, 27 Sep 2023 16:02:50 +0000 Received: by mail-yw1-x1135.google.com with SMTP id 00721157ae682-59f1dff5298so131690877b3.3 for ; Wed, 27 Sep 2023 09:02:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695830567; x=1696435367; darn=lists.postgresql.org; h=to:references:message-id:cc:date:in-reply-to:from:subject :mime-version:content-transfer-encoding:from:to:cc:subject:date :message-id:reply-to; bh=3ESVVCWTsnytO95dej4hjTIannwJcv9AF+emHn+MmKY=; b=SvG/iYL3eP+EQTcNtPbJpXNuSNuz03Qk75lV/BmS/CfsSr92HDtpeSE2NFqGB92Kmy BB3eI09kWvHx19rCpv+vFT13vWX9z+dhcSFT69zcLdKD14/qg15Xq6oxOFlx2dI0/O35 JrYCrC2MEMtGGoejrbGjM3peweCyQuCejNY1tR1o9I0zWs5eCr5kCWhZSKPpDrl4LDUM hNsdeNZzbv2I3NgwdKaNS0i570jQpN/g+BiI4uPjFID93WO1OyhQ+9n/JlebCQEddqI+ KZNEy4lB7l1E7hRiWGMWIWhIYbyIXhpBNOKol7/mrLCm0PtJdG9QZRSvzd2wgYS9WUv5 y65A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695830567; x=1696435367; h=to:references:message-id:cc:date:in-reply-to:from:subject :mime-version:content-transfer-encoding:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=3ESVVCWTsnytO95dej4hjTIannwJcv9AF+emHn+MmKY=; b=O+EXjZXYjki3fcHJGaHltqxIDfin2xb92oj9z1NMZdAmEK/Bn1QXsjHwxtg1PuvaUY Rx3Zedmom4u+Cf6wd/vlRknWd1XeSmGOR7BhnAdgUQAwvh3vJwGEJIQ0IKxIDVOQoBsQ 2Al5RtmC6ePXvsvunoyX3cYqTXPP0itEruq1DIO0SpWBi9mX54MZ+7MoYn4YyHH8C5eE wQHB5kCRjwJC89FNVvwIFtDWNOyRBwWpqJqW1zyk1LSGu8K6Hw9Oy42F1yb2TjykPHfd 2DLVEXsXvbRg9QGinAUv+Oko3tXmkNUj2JqjStJ67fc6G+r7iv4HpPkN5FTmPRDy5G9C t2iw== X-Gm-Message-State: AOJu0YzvWQXj3zdft6ikpjfdC5Ss58WAedaHMeq7O7xWn7+8hz0gmvgq 5n2/qWHObYeSLqitYP2Tc4g= X-Google-Smtp-Source: AGHT+IGfBaiJ6FR1qQPs8NYYGLnVpp2n76hc995ULW/ssIv/KU9/uoxkS+shbcLbX1o4I6rZIf8rBA== X-Received: by 2002:a25:6646:0:b0:d77:81e2:e9b2 with SMTP id z6-20020a256646000000b00d7781e2e9b2mr2341577ybm.45.1695830567506; Wed, 27 Sep 2023 09:02:47 -0700 (PDT) Received: from smtpclient.apple ([2601:14b:4100:252f:e172:b73c:cd5:be0a]) by smtp.gmail.com with ESMTPSA id y189-20020a2532c6000000b00d853795d3e6sm3445968yby.9.2023.09.27.09.02.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 27 Sep 2023 09:02:47 -0700 (PDT) Content-Type: multipart/alternative; boundary=Apple-Mail-5761B00B-889D-4667-8888-1A1451FDDA81 Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (1.0) Subject: Re: Upgrade postgres 14.6 to minor version using source code From: "Edward J. Sabol" In-Reply-To: Date: Wed, 27 Sep 2023 12:02:16 -0400 Cc: pgsql-admin Message-Id: References: To: Daulat X-Mailer: iPad Mail (20G81) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail-5761B00B-889D-4667-8888-1A1451FDDA81 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
It d= epends on what user you are executing these commands as and whether they own= the /opt/PostgreSQL-14/ and related directories. Using "sudo" for the confi= gure command seems very odd. One usually needs to use "sudo" on the "make in= stall" command unless the user you are running these commands owns /opt/....= But I presume you know what your system needs here.
<= br>
Anyway, you are missing some steps. I think it wou= ld be more like this:

wget &= lt;URL_of_tarball>
tar zxvf <tarball>
cd postgresql-<version>/
./c= onfigure <as you like>
make
pg_ctl stop
make install
pg_ct= l start

Personally, I insta= ll my source builds to separate directories for each version number. That wa= y, I can "make install" without affecting the currently running server. Then= , I use a script to change the symbolic links in the appropriate bin directo= ry to point to the new version. This allows me to move the "make install" co= mmand to before the "pg_ctl stop" command. This results in even less downtim= e when switching to the new version, but that may not be necessary depending= on your usage level. It also allows me to quickly revert to the previous ve= rsion if there's a problem. I also don't use "pg_ctl" directly. I have a mor= e sophisticated service script for stopping, starting, and restarting my Pos= tgreSQL server which sets the environment variables appropriately and then e= xecutes the appropriate "pg_ctl" commands for me. If you do as well, substit= ute as appropriate.

Hope th= is helps,
Ed

On Sep 27, 2023, at 7:21 AM, Daulat <daulat.dba@gmail.com> w= rote:
You mean, just we have to perform the below steps
sudo ./configure --prefix=3D/opt/Postgr= eSQL-14/ --with-openssl --exec-prefix=3D/opt/PostgreSQL-14/ --bindir=3D/o= pt/PostgreSQL-14/bin --with-ldap
make
make install
<= /div>

O= n Wed, Sep 27, 2023 at 1:46=E2=80=AFPM Laurenz Albe <laurenz.albe@cybertec.at> wrote:
On Wed, 20= 23-09-27 at 13:40 +0530, Daulat wrote:
> We are using the postgres 14.6 on Ubuntu that was installed via so= urce code (./configure) .
> Now we want to upgrade it to minor version 14.9. Please suggest, w= hat is the process
> for upgrading the minor releases if postgres was installed using source= code.
= --Apple-Mail-5761B00B-889D-4667-8888-1A1451FDDA81--