The IDs of previous clusters should be named like %{scl}-postgresql, similarly to how the default service files are named. So the /etc/opt/rh/rh-postgresql95/postgresql-setup/upgrade/scl-postgresql94.conf should have 'id' like 'rh-postgresql94-postgresql', not postgresql94-postgresql. Also, the default data directory of rh-postgresql94 is /var/opt/rh/rh-postgresql94/lib/pgsql/data, not /opt/rh/postgresql94/root/var/lib/pgsql/data
And the bin directory of 9.4 cluster is /opt/rh/rh-postgresql94/root/usr/bin instead of /opt/rh/postgresql94/root/usr/bin. The patch should look like: -id rh-postgresql94-postgresql +id postgresql94-postgresql major 9.4 -data_default /var/opt/rh/rh-postgresql94/lib/pgsql/data -engine /opt/rh/rh-postgresql94/root/usr/bin +data_default /opt/rh/postgresql94/root/var/lib/pgsql/data +engine /opt/rh/postgresql94/root/usr/bin description "Upgrade data from RHSCL 2.X PostgreSQL version (PostgreSQL 9.4)" scls "postgresql94" redhat_sockets_hack yes
Ah, this is correct: -id postgresql94-postgresql +id rh-postgresql94-postgresql major 9.4 -data_default /opt/rh/postgresql94/root/var/lib/pgsql/data -engine /opt/rh/postgresql94/root/usr/bin +data_default /var/opt/rh/rh-postgresql94/lib/pgsql/data +engine /opt/rh/rh-postgresql94/root/usr/bin description "Upgrade data from RHSCL 2.X PostgreSQL version (PostgreSQL 9.4)" -scls "postgresql94" +scls "rh-postgresql94" redhat_sockets_hack yes
Created attachment 1155309 [details] Proposed fix.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2016:1165