0 like 0 dislike
asked by (1.1k points)  
connection to database failed: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.50432"?

could not connect to source postmaster started with the command:
"/usr/pgsql-8.4/bin/pg_ctl" -w -l "pg_upgrade_server.log" -D "/db/pgsql/8.4/data" -o "-p 50432 -c autovacuum=off -c autovacuum_freeze_max_age=2000000000  -c listen_addresses='' -c unix_socket_permissions=0700" start
Failure, exiting


Please log in or register to answer this question.

2 Answers

0 like 0 dislike
answered by (1.1k points)  
edited by

assume the config directory and data directory​ was the same.

Change your command to this and it will work.

sudo -u postgres /usr/lib/postgresql/10/bin/pg_upgrade \  -b /usr/pgsql-8.4/bin/ \ -B /usr/lib/postgresql/10/bin \ -d /db/pgsql/8.4/data/ \ -D /var/lib/postgresql/10/main/ \ -o 'config_file=/db/pgsql/8.4/data/postgresql.conf' \ -O 'config_file=/etc/postgresql/10/main/postgresql.conf' \ -c

Here I used -c for checking before upgrade it's for pre request​ If all is well  then remove -c run above script without -c then only  upgraded your server

 And  if you get error again regarding for permission change user permission like  

chown postgres:postgres /current_directory

change the unix_socket_permission means local server permission in pg_hba.conf

local all all trust

 ls -l /var/run/postgresql/  ---Checking permission

0 like 0 dislike
answered by (1.1k points)  
Best answer
Earlier i am install use bin rpm.  Well,  i can upgrade when bin Install use from the source.

Related questions

0 like 0 dislike
1 answer