From: | "Edward J(dot) Sabol" <edwardjsabol(at)gmail(dot)com> |
---|---|
To: | Daulat <daulat(dot)dba(at)gmail(dot)com> |
Cc: | pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Upgrade postgres 14.6 to minor version using source code |
Date: | 2023-09-27 16:02:16 |
Message-ID: | CA6CAB3A-9EF5-44BF-B3D6-B64753BD1D73@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
It depends on what user you are executing these commands as and whether they own the /opt/PostgreSQL-14/ and related directories. Using "sudo" for the configure command seems very odd. One usually needs to use "sudo" on the "make install" command unless the user you are running these commands owns /opt/.... But I presume you know what your system needs here.
Anyway, you are missing some steps. I think it would be more like this:
wget <URL_of_tarball>
tar zxvf <tarball>
cd postgresql-<version>/
./configure <as you like>
make
pg_ctl stop
make install
pg_ctl start
Personally, I install my source builds to separate directories for each version number. That way, I can "make install" without affecting the currently running server. Then, I use a script to change the symbolic links in the appropriate bin directory to point to the new version. This allows me to move the "make install" command to before the "pg_ctl stop" command. This results in even less downtime 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 version if there's a problem. I also don't use "pg_ctl" directly. I have a more sophisticated service script for stopping, starting, and restarting my PostgreSQL server which sets the environment variables appropriately and then executes the appropriate "pg_ctl" commands for me. If you do as well, substitute as appropriate.
Hope this helps,
Ed
On Sep 27, 2023, at 7:21 AM, Daulat <daulat(dot)dba(at)gmail(dot)com> wrote:
You mean, just we have to perform the below steps
download software , wget https://ftp.postgresql.org/pub/source/v14.9/postgresql-14.9.tar.gz
sudo ./configure --prefix=/opt/PostgreSQL-14/ --with-openssl --exec-prefix=/opt/PostgreSQL-14/ --bindir=/opt/PostgreSQL-14/bin --with-ldap
make
make install
On Wed, Sep 27, 2023 at 1:46 PM Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> wrote:
On Wed, 2023-09-27 at 13:40 +0530, Daulat wrote:
> We are using the postgres 14.6 on Ubuntu that was installed via source code (./configure) .
> Now we want to upgrade it to minor version 14.9. Please suggest, what is the process
> for upgrading the minor releases if postgres was installed using source code.
From | Date | Subject | |
---|---|---|---|
Next Message | Scott Ribe | 2023-09-27 17:16:10 | Re: Terminating connection because of crash of another server process |
Previous Message | Scott Ribe | 2023-09-27 14:18:52 | Re: Terminating connection because of crash of another server process |