From unknown Sun Jun 15 10:55:28 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#47736] [PATCH] services: postgresql: Change service default socket directory. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 12 Apr 2021 20:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 47736 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47736@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.161826011022677 (code B ref -1); Mon, 12 Apr 2021 20:42:01 +0000 Received: (at submit) by debbugs.gnu.org; 12 Apr 2021 20:41:50 +0000 Received: from localhost ([127.0.0.1]:58210 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lW3NV-0005th-HD for submit@debbugs.gnu.org; Mon, 12 Apr 2021 16:41:49 -0400 Received: from lists.gnu.org ([209.51.188.17]:42264) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lW3NT-0005tX-6b for submit@debbugs.gnu.org; Mon, 12 Apr 2021 16:41:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45910) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lW3NS-0008ES-Vm for guix-patches@gnu.org; Mon, 12 Apr 2021 16:41:46 -0400 Received: from mira.cbaines.net ([212.71.252.8]:43188) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lW3NQ-0003xg-Ky for guix-patches@gnu.org; Mon, 12 Apr 2021 16:41:46 -0400 Received: from localhost (unknown [IPv6:2a02:8010:68c1:0:8ac0:b4c7:f5c8:7caa]) by mira.cbaines.net (Postfix) with ESMTPSA id A499027BC72 for ; Mon, 12 Apr 2021 21:41:42 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 81147369 for ; Mon, 12 Apr 2021 20:41:41 +0000 (UTC) From: Christopher Baines Date: Mon, 12 Apr 2021 21:41:41 +0100 Message-Id: <20210412204141.27659-1-mail@cbaines.net> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=212.71.252.8; envelope-from=mail@cbaines.net; helo=mira.cbaines.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Fixes . 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 ()[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 From unknown Sun Jun 15 10:55:28 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Christopher Baines Subject: bug#47736: closed (Re: [bug#47736] [PATCH] services: postgresql: Change service default socket directory.) Message-ID: References: <20210412204141.27659-1-mail@cbaines.net> X-Gnu-PR-Message: they-closed 47736 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 47736@debbugs.gnu.org Date: Mon, 12 Apr 2021 23:16:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1618269362-21190-1" This is a multi-part message in MIME format... ------------=_1618269362-21190-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #47736: [PATCH] services: postgresql: Change service default socket directo= ry. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 47736@debbugs.gnu.org. --=20 47736: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D47736 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1618269362-21190-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 47736-done) by debbugs.gnu.org; 12 Apr 2021 23:15:41 +0000 Received: from localhost ([127.0.0.1]:58285 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lW5mO-0005UQ-Uu for submit@debbugs.gnu.org; Mon, 12 Apr 2021 19:15:41 -0400 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:34509) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lW5mN-0005UD-Fi for 47736-done@debbugs.gnu.org; Mon, 12 Apr 2021 19:15:40 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 9A4FC1702; Mon, 12 Apr 2021 19:15:33 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 12 Apr 2021 19:15:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=mesmtp; bh=5aEuKuHptuTXxbrqOThp5r8N iKWb8YMfIvBaOhkPmjg=; b=D3wEaGCV1Oo5rBUCjadw8Ht7sKPaUC9k7QFbCBh1 CAaOYUUo20GruHaETnvgoEU7syGF0R3mOzzzCddobNBmBTwWW9z5p/GqsXVlaohx 4suKfTZk7V8Q5J/vh18v/h7HVHEa9cKyG7dibrM3ctKOGgrwhy2oVU71GtENDDIj EHo= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=5aEuKu HptuTXxbrqOThp5r8NiKWb8YMfIvBaOhkPmjg=; b=ILbGRUuN0Ku7aX9ugf/K6v fLgwLiMyWKOTN4OwVBSjY7inHOnJjCNg9xBHga7fEvEYeRa+a+r6AUcV00D+TUCf dRykF8sC4l0du71gQXU5oa56KlsT4gZHDCIvVSOTM7lT0FXkPq8K4eWJtP7Hjvrl Tfa3LYPgh0WYTqqpsyeBIaYK71baOjfEsqebMQSKpX+f86oFeeFu+cyyGCYDS1Gr pbVQu1yEGAAmKZN7Wy25ZvXQ2WBDTrZrba51gTZ6IWFQTAzzLBMQjccgZ42NU6CO pkgLEG+XcJAEqYU5d0bvhvCFLFy89sqhnoDf/tcQmNcxNzPUXFfOcnAiPwqYGauA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudekkedgudekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggujgesthdtro dttddtvdenucfhrhhomhepnfgvohcuhfgrmhhulhgrrhhiuceolhgvohesfhgrmhhulhgr rhhirdhnrghmvgeqnecuggftrfgrthhtvghrnheptefggfeuuedujeelledvjedujeeltd dvgfelfffgfeeuteeivedtkeelheeuudeunecuffhomhgrihhnpehgnhhurdhorhhgnecu kfhppedutddtrdduuddrudeiledruddukeenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpehlvghosehfrghmuhhlrghrihdrnhgrmhgv X-ME-Proxy: Received: from localhost (pool-100-11-169-118.phlapa.fios.verizon.net [100.11.169.118]) by mail.messagingengine.com (Postfix) with ESMTPA id E9E0C1080057; Mon, 12 Apr 2021 19:15:32 -0400 (EDT) Date: Mon, 12 Apr 2021 19:15:30 -0400 From: Leo Famulari To: Christopher Baines Subject: Re: [bug#47736] [PATCH] services: postgresql: Change service default socket directory. Message-ID: References: <20210412204141.27659-1-mail@cbaines.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210412204141.27659-1-mail@cbaines.net> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 47736-done Cc: 47736-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Mon, Apr 12, 2021 at 09:41:41PM +0100, Christopher Baines wrote: > Fixes . > > 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 ()[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. ------------=_1618269362-21190-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 12 Apr 2021 20:41:50 +0000 Received: from localhost ([127.0.0.1]:58210 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lW3NV-0005th-HD for submit@debbugs.gnu.org; Mon, 12 Apr 2021 16:41:49 -0400 Received: from lists.gnu.org ([209.51.188.17]:42264) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lW3NT-0005tX-6b for submit@debbugs.gnu.org; Mon, 12 Apr 2021 16:41:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45910) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lW3NS-0008ES-Vm for guix-patches@gnu.org; Mon, 12 Apr 2021 16:41:46 -0400 Received: from mira.cbaines.net ([212.71.252.8]:43188) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lW3NQ-0003xg-Ky for guix-patches@gnu.org; Mon, 12 Apr 2021 16:41:46 -0400 Received: from localhost (unknown [IPv6:2a02:8010:68c1:0:8ac0:b4c7:f5c8:7caa]) by mira.cbaines.net (Postfix) with ESMTPSA id A499027BC72 for ; Mon, 12 Apr 2021 21:41:42 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 81147369 for ; Mon, 12 Apr 2021 20:41:41 +0000 (UTC) From: Christopher Baines To: guix-patches@gnu.org Subject: [PATCH] services: postgresql: Change service default socket directory. Date: Mon, 12 Apr 2021 21:41:41 +0100 Message-Id: <20210412204141.27659-1-mail@cbaines.net> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=212.71.252.8; envelope-from=mail@cbaines.net; helo=mira.cbaines.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Fixes . 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 ()[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 ------------=_1618269362-21190-1--