View previous topic :: View next topic |
Author |
Message |
nitro322 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/Final Fantasy/Final_Fantasy_6_-_Sabin.jpg)
Joined: 24 Jul 2002 Posts: 596 Location: USA
|
Posted: Fri May 26, 2017 2:53 pm Post subject: postgresql - socket not working after 9.5.7 upgrade |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
adsmol n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 26 Nov 2012 Posts: 2
|
Posted: Thu Jun 01, 2017 8:31 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
nitro322 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/Final Fantasy/Final_Fantasy_6_-_Sabin.jpg)
Joined: 24 Jul 2002 Posts: 596 Location: USA
|
Posted: Thu Jun 01, 2017 5:47 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|