GNU bug report logs - #47736
[PATCH] services: postgresql: Change service default socket directory.

Previous Next

Package: guix-patches;

Reported by: Christopher Baines <mail <at> cbaines.net>

Date: Mon, 12 Apr 2021 20:42:01 UTC

Severity: normal

Tags: patch

Done: Leo Famulari <leo <at> famulari.name>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 47736 in the body.
You can then email your comments to 47736 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#47736; Package guix-patches. (Mon, 12 Apr 2021 20:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Christopher Baines <mail <at> cbaines.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 12 Apr 2021 20:42:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: guix-patches <at> gnu.org
Subject: [PATCH] services: postgresql: Change service default socket directory.
Date: Mon, 12 Apr 2021 21:41:41 +0100
Fixes <https://bugs.gnu.org/46737>.

PostgreSQL running with a different socket directory to the default one in the
package itself breaks some services, this commit restores the previous
behaviour where PostgreSQL by default will run with a socket directory that
matches the default used by PostgreSQL packaged for Guix.

Switching to a different default value can happen, but only alongside changing
the PostgreSQL package.

* gnu/services/databases.scm (<postgresql-config-file>)[socket-directory]:
Change default to #false.
* doc/guix.texi (Database Services): Update documentation, and specify a
different value for disabling connections via sockets.
* gnu/tests/guix.scm (%guix-data-service-os): Use default PostgreSQL
behaviour.
* gnu/tests/monitoring.scm (%zabbix-os): Likewise.
* gnu/tests/web.scm (patchwork-os): Likewise.
---
 doc/guix.texi              | 9 ++++++---
 gnu/services/databases.scm | 2 +-
 gnu/tests/guix.scm         | 5 +----
 gnu/tests/monitoring.scm   | 7 +------
 gnu/tests/web.scm          | 7 +------
 5 files changed, 10 insertions(+), 20 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 456dfb264d..1069a5d296 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -19830,12 +19830,15 @@ configuration.
 @item @code{ident-file} (default: @code{%default-postgres-ident})
 Filename or G-expression for the user name mapping configuration.
 
-@item @code{socket-directory} (default: @code{"/var/run/postgresql"})
+@item @code{socket-directory} (default: @code{#false})
 Specifies the directory of the Unix-domain socket(s) on which PostgreSQL
-is to listen for connections from client applications.  If set to
-@code{#false} PostgreSQL does not listen on any Unix-domain sockets, in
+is to listen for connections from client applications. If set to
+@code{""} PostgreSQL does not listen on any Unix-domain sockets, in
 which case only TCP/IP sockets can be used to connect to the server.
 
+By default, the @code{#false} value means the PostgreSQL default value
+will be used, which is currently @samp{/tmp}.
+
 @item @code{extra-config} (default: @code{'()})
 List of additional keys and values to include in the PostgreSQL config
 file.  Each entry in the list should be a list where the first element
diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm
index a841e7a50e..6ef3f3383c 100644
--- a/gnu/services/databases.scm
+++ b/gnu/services/databases.scm
@@ -115,7 +115,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 "/var/run/postgresql"))
+                     (default #false))
   (extra-config      postgresql-config-file-extra-config
                      (default '())))
 
diff --git a/gnu/tests/guix.scm b/gnu/tests/guix.scm
index 219b8b482f..af7d8f0b21 100644
--- a/gnu/tests/guix.scm
+++ b/gnu/tests/guix.scm
@@ -164,10 +164,7 @@
                             "
 local	all	all			trust
 host	all	all	127.0.0.1/32 	trust
-host	all	all	::1/128 	trust"))
-               ;; XXX: Remove when postgresql default socket directory is
-               ;; changed to /var/run/postgresql.
-               (socket-directory #f)))))
+host	all	all	::1/128 	trust"))))))
    (service guix-data-service-type
             (guix-data-service-configuration
              (host "0.0.0.0")))
diff --git a/gnu/tests/monitoring.scm b/gnu/tests/monitoring.scm
index be69e1c259..8630f5818c 100644
--- a/gnu/tests/monitoring.scm
+++ b/gnu/tests/monitoring.scm
@@ -309,12 +309,7 @@ zabbix||{}
           (service dhcp-client-service-type)
           (service postgresql-service-type
                    (postgresql-configuration
-                    (postgresql postgresql)
-                   ;; XXX: Remove when postgresql default socket directory is
-                    ;; changed to /var/run/postgresql.
-                    (config-file
-                     (postgresql-config-file
-                      (socket-directory #f)))))
+                    (postgresql postgresql)))
           (service zabbix-front-end-service-type
                    (zabbix-front-end-configuration
                     (db-password "zabbix")))
diff --git a/gnu/tests/web.scm b/gnu/tests/web.scm
index cc0e79c8b2..7f4518acd2 100644
--- a/gnu/tests/web.scm
+++ b/gnu/tests/web.scm
@@ -569,12 +569,7 @@ HTTP-PORT."
                (listen '("8080"))))))
    (service postgresql-service-type
             (postgresql-configuration
-             (postgresql postgresql-10)
-             ;; XXX: Remove when postgresql default socket directory is
-             ;; changed to /var/run/postgresql.
-             (config-file
-              (postgresql-config-file
-               (socket-directory #f)))))
+             (postgresql postgresql-10)))
    (service patchwork-service-type
             (patchwork-configuration
              (patchwork patchwork)
-- 
2.30.1





Reply sent to Leo Famulari <leo <at> famulari.name>:
You have taken responsibility. (Mon, 12 Apr 2021 23:16:02 GMT) Full text and rfc822 format available.

Notification sent to Christopher Baines <mail <at> cbaines.net>:
bug acknowledged by developer. (Mon, 12 Apr 2021 23:16:02 GMT) Full text and rfc822 format available.

Message #10 received at 47736-done <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Christopher Baines <mail <at> cbaines.net>
Cc: 47736-done <at> debbugs.gnu.org
Subject: Re: [bug#47736] [PATCH] services: postgresql: Change service default
 socket directory.
Date: Mon, 12 Apr 2021 19:15:30 -0400
On Mon, Apr 12, 2021 at 09:41:41PM +0100, Christopher Baines wrote:
> Fixes <https://bugs.gnu.org/46737>.
> 
> PostgreSQL running with a different socket directory to the default one in the
> package itself breaks some services, this commit restores the previous
> behaviour where PostgreSQL by default will run with a socket directory that
> matches the default used by PostgreSQL packaged for Guix.
> 
> Switching to a different default value can happen, but only alongside changing
> the PostgreSQL package.
> 
> * gnu/services/databases.scm (<postgresql-config-file>)[socket-directory]:
> Change default to #false.
> * doc/guix.texi (Database Services): Update documentation, and specify a
> different value for disabling connections via sockets.
> * gnu/tests/guix.scm (%guix-data-service-os): Use default PostgreSQL
> behaviour.
> * gnu/tests/monitoring.scm (%zabbix-os): Likewise.
> * gnu/tests/web.scm (patchwork-os): Likewise.

Thanks, I hastily pushed as c311147bd16aa0e5746d9cbf31502f5fd61e470c in
order to squeeze this in before the "string freeze", which began today.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 11 May 2021 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 351 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.