Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
postgresql - socket not working after 9.5.7 upgrade
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
nitro322
Guru
Guru


Joined: 24 Jul 2002
Posts: 596
Location: USA

PostPosted: Fri May 26, 2017 2:53 pm    Post subject: postgresql - socket not working after 9.5.7 upgrade Reply with quote

I run postgresql on my server and use pg_dumpall to backup the databases in a nightly cron job. Been working fine for years, but after the recent 9.5.7 upgrade I began receiving this error:

Code:
pg_dumpall: could not connect to database "template1": could not connect to server: No such file or directory
   Is the server running locally and accepting
   connections on Unix domain socket "/run/postgresql/.s.PGSQL.5432"?

Error: PostgreSQL databases could not be dumped


After troubleshooting, sure enough the socket no longer existed at /run/postgresql/.s.PGSQL.5432, nor apparently anywhere else on my system. I fiddled with the postgresql.conf file to explicitly define it in a couple different locations with no luck. Tried searching for troubleshooting info on this, but everything I found referred to much older versions, Mac versions, or just general misconfigurations. In order to verify it was caused by the 9.5.7 upgrade, I downgraded to 9.5.5, restarted, and it was back.

Any ideas on how to get the socket working in 9.5.7? Anyone else running postgresql - do you have the same problem? I don't think I should have any kind of special configuration that would cause this.

Appreciate any guidance. Thanks.
_________________
https://www.legroom.net/
Back to top
View user's profile Send private message
adsmol
n00b
n00b


Joined: 26 Nov 2012
Posts: 2

PostPosted: Thu Jun 01, 2017 8:31 am    Post subject: Reply with quote

I had the same. I my case helped adding line:

Code:
PG_SOCKET_DIRECTORIES="/run/postgresql"


to file /etc/conf.d/postgresql-9.5 and restarting the server.
Back to top
View user's profile Send private message
nitro322
Guru
Guru


Joined: 24 Jul 2002
Posts: 596
Location: USA

PostPosted: Thu Jun 01, 2017 5:47 pm    Post subject: Reply with quote

Thank you so much for the suggestion. Just upgraded again and tried that, and it works like a champ.

Much appreciated.
_________________
https://www.legroom.net/
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum