I was trying to test some code today and I realized I need a working PostgreSQL
server. When I tried to start the server, it failed with this error.
Ah, I upgraded to F26 recently and I suppose that came with a new version of
PostgreSQL. I figured fixing this should be trivial. Well, not exactly. When
I first ran the command, it asked me to install the postgresql-upgrade
package. Once I did install it, the command threw a strange error.
The /var/lib/pgsql/data-old/postmaster.pid file doesn’t even exist. It took
me some time to realize that it’s actually looking at
/var/lib/pgsql/data/postmaster.pid, which does exist. I think at some point,
I had a running PostgreSQL server and I didn’t shutdown the computer cleanly.
This lead to a stale PID file. Once I renamed the PID file, the upgrade command