Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [SOLVED] postgresql needs rebuild (Read 1067 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

[SOLVED] postgresql needs rebuild

after upgrade to postgresql 12.2-3 i can‘t access postgresql database-shell:

Code: [Select]
$ 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.

Re: postgresql needs rebuild

Reply #1
shouldn't you just restart postgresql after update??

Re: postgresql needs rebuild

Reply #2
I tried rebuilding locally, it does not change result

Re: postgresql needs rebuild

Reply #3
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:

Code: [Select]
/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 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)

Re: postgresql needs rebuild

Reply #4
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

Re: postgresql needs rebuild

Reply #5
@ndowens, you can add this patch postgresql-run-socket.patch to PKGBUILD.

merge request prepared, thx ndowens!



Re: postgresql needs rebuild

Reply #7
after update to 12.3-1.2 postgresql is working, thanks andreas