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:
|