title: Error unix_socket_directory in upgrading from postgresql 9.2 to 9.6 in RedHat
body: <p>I'am strugling for hours already in upgrading my postgresql server 9.2 to 9.6.
  Here is what I've done:</p>
  
  <p>Ran this as postgres:</p>
  
  <pre><code>/usr/pgsql-9.6/bin/pg_upgrade --old-bindir=/usr/bin/ --new-bindir=/usr/pgsql-9.6/bin/ --old-datadir=/var/lib/pgsql/data/ --new-datadir=/var/lib/pgsql/9.6/data/ --check
  </code></pre>
  
  <p>Got the output:</p>
  
  <pre><code>Performing Consistency Checks on Old Live Server
  -------------------------------------------------
  Checking cluster versions                                   ok
  Checking database user is the install user                  ok
  Checking database connection settings                       ok
  Checking for prepared transactions                          ok
  Checking for reg* system OID user data types                ok
  Checking for contrib/isn with bigint-passing mismatch       ok
  Checking for roles starting with 'pg_'                      ok
  Checking for invalid "line" user columns                    ok
  Checking for presence of required libraries                 ok
  Checking database user is the install user                  ok
  Checking for prepared transactions                          ok
  
  *Clusters are compatible*
  </code></pre>
  
  <p>Ok everything positive, here we go, lets try upgrading.</p>
  
  <p>First, ran as root, as described <a href="https://medium.com/@plashchynski/postgresql-upgrade-on-centos-4c0ddd2f8687" rel="nofollow noreferrer">here</a>:</p>
  
  <pre><code>service postgresql stop
  </code></pre>
  
  <p>Then, the upgrade command (as postgres user):</p>
  
  <pre><code>/usr/pgsql-9.6/bin/pg_upgrade --old-bindir=/usr/bin/ --new-bindir=/usr/pgsql-9.6/bin/ --old-datadir=/var/lib/pgsql/data/ --new-datadir=/var/lib/pgsql/9.6/data/
  </code></pre>
  
  <p>Got the ERROR output inside the <em>/var/lib/pgsql/data/pg_upgrade_server.log</em> file:</p>
  
  <pre><code>271 -----------------------------------------------------------------
  272   pg_upgrade run on Fri Mar  2 15:44:09 2018
  273 -----------------------------------------------------------------
  274
  275 command: "/usr/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_s    ocket_directory='/var/lib/pgsql/data'" start &gt;&gt; "pg_upgrade_server.log" 2&gt;&amp;1
  276 waiting for server to start....FATAL:  unrecognized configuration parameter "unix_socket_directory"
  277  stopped waiting
  278 pg_ctl: could not start server
  279 Examine the log output.
  </code></pre>
  
  <p>How to get this done?</p>
  
  <p>Anyone?</p>