SuperSajuuk

Member
Apr 10, 2016
13
2
3
United Kingdom
cPanel Access Level
Root Administrator
Using this guide: PostgreSQL 9.2 to 9.5 Upgrade

I cannot get the upgrade to work. I am able to get to the point where I need to run pg_upgrade, but no matter what I do, the upgrader tool refuses to actually carry out the upgrade, but it never bothers to actually state what the error is, it just writes to pg_upgrade_server.log but no errors, which is hardly useful for to diagnose the issue.

When running pg_upgrade with —check, it always returns an error about PostgreSQL already running due to postmaster.pid existing.

It could be that i have corrupted the install in some way, which is easy to resolve by removing 9.5 and 9.2 (the latter being from the cpanel script), then reinstalling 9.2 from scratch and performing the steps again, but the text file in the guide isn’t very clear on all the steps i need to take.

Any advice on how to complete the upgrade would be appreciated.
 
Last edited:

cPanelLauren

Forums Analyst II
Staff member
Nov 14, 2017
7,995
645
263
Houston
cPanel Access Level
DataCenter Provider
Hello @SuperSajuuk


First of all, I need to note that we only support the PostgreSQL version which is shipped with the OS which at this time is 9.2. This is also noted in our documentation here: Install or Update PostgreSQL on Your cPanel Server - cPanel Knowledge Base - cPanel Documentation

Secondly what you're linking is very old and it's possible the steps the user took there are no longer valid.

We can't guarantee reliability on customizations which we do not support.

That being said what is the error you're getting exactly?

When you run the following:

Code:
systemctl stop postgresql
Then run the following:
Code:
ps faux |grep post
Do you continue to see PostgreSQL processes running?
 

SuperSajuuk

Member
Apr 10, 2016
13
2
3
United Kingdom
cPanel Access Level
Root Administrator
Hi there @cPanelLauren

That's just it: there is no error being printed by the upgrade tool, it just fails for no apparent reason.

I was able to revert everything back to 9.2 (with only one minor issue being observed with one database) after a lot of issues and random corruption of databases / failing imports, and most likely I did a step incorrectly when performing the initial upgrade to 9.5 (I don't believe I really need to upgrade, as the only primary reason is to be able to use the ON CONFLICT feature: I may be able to use a different method that does something similar without it though).

When I do the `stop` request to the service, no postgres services were running as per the requirements of pg_upgrade, but I get no errors, just a "failure, exiting" and the command stops. As said though, I probably made an error when performing the upgrade (like moving the files instead of copying them) which probably broke the relations.

Will keep trying and report back using the guide I linked, since it mostly worked barring this one error which may be specific to my system, so chances are I just did something wrongly :D
 
  • Like
Reactions: cPanelLauren