Re: Upgrade postgres 14.6 to minor version using source code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.dba@xxxxxxxxx> wrote:
You mean, just we have to perform the below steps
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.albe@xxxxxxxxxxx> 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.

[Index of Archives]     [Postgresql Home]     [Postgresql General]     [Postgresql Performance]     [Postgresql PHP]     [Postgresql Jobs]     [PHP Users]     [PHP Databases]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Forum]

  Powered by Linux