Description of problem:
The upgrade script appears to not know where to find the PGDATA dir and there appears to be no way of telling it.
It complains about the /var/lib/psql/data-old directory and the following line was failing:
"/usr/lib64/pgsql/postgresql-10/bin/pg_ctl" -w -l "pg_upgrade_server.log" -D "/var/lib/pgsql/data-old" -o "-p 5432 -b -c listen_addresses='' -c unix_socket_permissions=0700 -c unix_socket_directories='/var/lib/pgsql'" start
Changing it to:
sudo -u postgres "/usr/lib64/pgsql/postgresql-10/bin/pg_ctl" -w -l "/var/lib/pgsql/pg_upgrade_server.log" -D "/var/lib/pgsql/data" -o "-p 5432 -b -c listen_addresses='' -c unix_socket_permissions=0700 -c unix_socket_directories='/var/lib/pgsql'" start
Does work for that step but it fails again later looking for data-old.
Using --datadir with the command is deprecated, instead --unit is recommended.
sudo -u postgres postgresql-setup --upgrade --unit /usr/lib/systemd/system/postgresql.service
Fails because PGDATA is not set, but it is in the Environment= in that file.
Per postgresql-setup --help:
--unit=UNIT_NAME The UNIT_NAME is used to select proper unit
configuration (unit == service or initscript name
on non-systemd systems). For example, if you want
to work with unit called
'postgresql@com_example.service', you should use
'postgresql@com_example' (without trailing .service
string). When no UNIT_NAME is explicitly passed,
the 'postgresql' string is used by default.
Yes, we should support both absolute name of service file, and with/without
the `.service` suffix -- but it is not yet supported.
This message is a reminder that Fedora 30 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 30 on 2020-05-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '30'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.
Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 30 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Fedora 30 changed to end-of-life (EOL) status on 2020-05-26. Fedora 30 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
Thank you for reporting this bug and we are sorry it could not be fixed.