after upgrade to postgresql 12.2-3 i can‘t access postgresql database-shell:
$ psql -d davical
Fehler: konnte nicht mit Datenbank davical verbinden: konnte nicht mit dem Server verbinden: Datei oder Verzeichnis nicht gefunden
Läuft der Server lokal und akzeptiert er Verbindungen
auf dem Unix-Domain-Socket »/tmp/.s.PGSQL.5432«?
The socket is in /run/postgresql. After rebuild the socket in /run/postgresql is found again.
shouldn't you just restart postgresql after update??
I tried rebuilding locally, it does not change result
I reopen this thread because of the same issue after upgrades to 12.3-1 and 12.3-1.1.
I think that postgresql-openrc and postgresql are using different configurations:
/etc/conf.d/postgresql
# /run/postgresql is the default directory.
PG_SOCKET_DIRECTORIES="/run/postgresql"
postgresql-12.3/src/include/pg_config_manual.h
#define DEFAULT_PGSOCKET_DIR "/tmp"
In the actual PKGBUILD (https://gitea.artixlinux.org/packagesP/postgresql.git) the postgresql-run-socket.patch is no longer used, though its still in the sources.
After adding the patch to the PKGBUILD and local rebuild i can use postgresql without errors.
(The local rebuild in my first post was successfull because i used an adapted older PKGBUILD, sorry)
1.1 was the rebuild with the changed tmpfiles.d alium notified me to add to it. I am unsure what else should be done to it, as I dont use any type of database package.
@alium
@ndowens, you can add this patch postgresql-run-socket.patch to PKGBUILD.
merge request prepared, thx ndowens!
after update to 12.3-1.2 postgresql is working, thanks andreas