Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to upgrade Postgresql from 9.2 to 9.3 in Fedora 18 using this command as the postgres user

$ pg_upgrade -b /bin -B /usr/pgsql-9.3/bin -d /var/lib/pgsql/data -D /var/lib/pgsql/9.3/data/ -j 2 -u postgres

The error in the log

command: "/bin/pg_ctl" -w -l "pg_upgrade_server.log" -D "/var/lib/pgsql/data" -o "-p 50432 -b -c listen_addresses='' -c unix_socket_permissions=0700 -c unix_socket_directory='/var/lib/pgsql'" start >> "pg_upgrade_server.log" 2>&1 waiting for server to start....FATAL: unrecognized configuration parameter "unix_socket_directory" .... stopped waiting pg_ctl: could not start server

As pointed by a_horse in the comments that parameter was replaced by unix_socket_directories (plural) in 9.3. But the server version being started is the old one 9.2:

$ /bin/pg_ctl --version
pg_ctl (PostgreSQL) 9.2.4

Any ideas?

share|improve this question
That parameter has been renamed to unix_socket_directories: – a_horse_with_no_name Sep 18 '13 at 14:52
@a_horse That command tries to start version 9.2. Check the updated question – Clodoaldo Sep 18 '13 at 16:01

I hacked the problem by running (as root):

mv /usr/bin/pg_ctl{,-orig}
echo '#!/bin/bash' > /usr/bin/pg_ctl
echo '"$0"-orig "${@/unix_socket_directory/unix_socket_directories}"' >> 
chmod +x /usr/bin/pg_ctl

Run pg_upgrade as intended, then undo the hack:

mv -f /usr/bin/pg_ctl{-orig,}
share|improve this answer

I've got the same problem. I was upgrading from Fedora Repo's 9.2.4 to PGDG 9.3. The source of the problem is that Fedora backports changes of parameter unix_socket_directory to unix_socket_directories (see

My solution is to rebuild the pg_upgrade from sources, with update to file contrib/pg_upgrade/server.c:199 where pg_upgrade checks for server version:

199:       (GET_MAJOR_VERSION(cluster->major_version) < 903) ?

, in my case i change it to:

199:       (GET_MAJOR_VERSION(cluster->major_version) < 900) ?

(see my patch file here).

share|improve this answer
Could you please explain why does this fix the issue (to the likes of myself, who are not overly familiar with the sources (beware of the understatement!))? – dezso Sep 29 '13 at 7:44
As per @a_horse comment above, upstream PostgreSQL have changed the parameter unix_socket_directory to unix_socket_directories in version 9.3. But the Fedora maintainer backports it to lower version. So, pg_upgrade from PGDG (PostgreSQL Global Development Group) YUM Repository expects that the 9.2.4 version accepts unix_socket_directory, but actually the 9.2.4 from Fedora YUM Repository accepts unix_socket_directories. In this case, because Fedora backports it into version 9.0 onwards, i changed it to use unix_socket_directories for version >= 9.0. – Ali Akbar Sep 29 '13 at 22:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.