services: database: Change postgresql default socket.

Adapt to the postgresql default socket directory set to /var/run/postgresql.

* gnu/services/databases.scm (<postgresql-config-file>)[socket-directory]: Set
to /var/run/postgresql.
(<postgresql-role-configuration>): Ditto.
* gnu/tests/databases.scm (run-postgresql-test): Adapt it.
This commit is contained in:
Mathieu Othacehe 2021-09-27 19:22:56 +00:00
parent 02c4344554
commit 502925655d
No known key found for this signature in database
GPG Key ID: 8354763531769CA6
2 changed files with 3 additions and 4 deletions

@ -116,7 +116,7 @@ host all all ::1/128 md5"))
(ident-file postgresql-config-file-ident-file
(default %default-postgres-ident))
(socket-directory postgresql-config-file-socket-directory
(default #false))
(default "/var/run/postgresql"))
(extra-config postgresql-config-file-extra-config
(default '())))
@ -364,7 +364,7 @@ and stores the database cluster in @var{data-directory}."
postgresql-role-configuration make-postgresql-role-configuration
postgresql-role-configuration?
(host postgresql-role-configuration-host ;string
(default "/tmp"))
(default "/var/run/postgresql"))
(log postgresql-role-configuration-log ;string
(default "/var/log/postgresql_roles.log"))
(roles postgresql-role-configuration-roles

@ -228,8 +228,7 @@
(let* ((port (open-pipe*
OPEN_READ
#$(file-append postgresql "/bin/psql")
"-tAh" "/tmp"
"-c" "SELECT 1 FROM pg_database WHERE
"-tA" "-c" "SELECT 1 FROM pg_database WHERE
datname='root'"))
(output (get-string-all port)))
(close-pipe port)