From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id YBGEMpt0d18rVAAA0tVLHw (envelope-from ) for ; Fri, 02 Oct 2020 18:42:35 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id sMBMLpt0d1/wNwAAbx9fmQ (envelope-from ) for ; Fri, 02 Oct 2020 18:42:35 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8AE2C9402DA for ; Fri, 2 Oct 2020 18:42:35 +0000 (UTC) Received: from localhost ([::1]:38398 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kOQ0o-0000mo-HE for larch@yhetil.org; Fri, 02 Oct 2020 14:42:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57312) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kOQ0K-0000UE-OU for guix-patches@gnu.org; Fri, 02 Oct 2020 14:42:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59262) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kOQ0J-0002LJ-B5 for guix-patches@gnu.org; Fri, 02 Oct 2020 14:42:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kOQ0J-0002nO-9w for guix-patches@gnu.org; Fri, 02 Oct 2020 14:42:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#43771] [PATCH 5/5] Don't specify a default postgresql version to use for the service Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 02 Oct 2020 18:42:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43771 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 43771@debbugs.gnu.org Received: via spool by 43771-submit@debbugs.gnu.org id=B43771.160166406610652 (code B ref 43771); Fri, 02 Oct 2020 18:42:03 +0000 Received: (at 43771) by debbugs.gnu.org; 2 Oct 2020 18:41:06 +0000 Received: from localhost ([127.0.0.1]:42570 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOPzN-0002le-Ll for submit@debbugs.gnu.org; Fri, 02 Oct 2020 14:41:05 -0400 Received: from mira.cbaines.net ([212.71.252.8]:44628) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOPzK-0002ks-S1 for 43771@debbugs.gnu.org; Fri, 02 Oct 2020 14:41:04 -0400 Received: from localhost (188.28.111.33.threembb.co.uk [188.28.111.33]) by mira.cbaines.net (Postfix) with ESMTPSA id 55D3027BBEC for <43771@debbugs.gnu.org>; Fri, 2 Oct 2020 19:41:02 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id b89fd893 for <43771@debbugs.gnu.org>; Fri, 2 Oct 2020 18:40:59 +0000 (UTC) From: Christopher Baines Date: Fri, 2 Oct 2020 19:40:59 +0100 Message-Id: <20201002184059.29033-5-mail@cbaines.net> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201002184059.29033-1-mail@cbaines.net> References: <20201002184059.29033-1-mail@cbaines.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 3.99 X-TUID: YGelL2p/XLrs Currently, if the postgresql package major version changes, this is going to break the service upon upgrade, because PostgreSQL will reject the data files from the differing major version of the service. Because it's important to either keep running a particular major version, or intentionally upgrade, I think the configuration would be better with no default. I think this is also going to be helpful when trying to assist users upgrading PostgreSQL. --- doc/guix.texi | 6 ++++-- gnu/services/databases.scm | 6 ++---- gnu/tests/databases.scm | 4 +++- gnu/tests/guix.scm | 1 + gnu/tests/monitoring.scm | 4 +++- gnu/tests/web.scm | 4 +++- 6 files changed, 16 insertions(+), 9 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 641b410acf..4ce0072ed4 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -17742,7 +17742,9 @@ The following example describes a PostgreSQL service with the default configuration. @lisp -(service postgresql-service-type) +(service postgresql-service-type + (postgresql-configuration + (postgresql postgresql-10))) @end lisp If the services fails to start, it may be due to an incompatible @@ -17768,7 +17770,7 @@ Data type representing the configuration for the @code{postgresql-service-type}. @table @asis -@item @var{postgresql} (default: @code{postgresql}) +@item @var{postgresql} PostgreSQL package to use for the service. @item @var{port} (default: @code{5432}) diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm index efad182a68..96d2dc4935 100644 --- a/gnu/services/databases.scm +++ b/gnu/services/databases.scm @@ -146,8 +146,7 @@ host all all ::1/128 md5")) (define-record-type* postgresql-configuration make-postgresql-configuration postgresql-configuration? - (postgresql postgresql-configuration-postgresql ; - (default postgresql)) + (postgresql postgresql-configuration-postgresql) ; (port postgresql-configuration-port (default 5432)) (locale postgresql-configuration-locale @@ -278,8 +277,7 @@ host all all ::1/128 md5")) (service-extension account-service-type (const %postgresql-accounts)) (service-extension profile-service-type - (compose list postgresql-configuration-postgresql)))) - (default-value (postgresql-configuration)))) + (compose list postgresql-configuration-postgresql)))))) ;;; diff --git a/gnu/tests/databases.scm b/gnu/tests/databases.scm index e0544bbcd2..d3045cc3f7 100644 --- a/gnu/tests/databases.scm +++ b/gnu/tests/databases.scm @@ -215,7 +215,9 @@ (define %postgresql-os (simple-operating-system - (service postgresql-service-type))) + (service postgresql-service-type + (postgresql-configuration + (postgresql postgresql-10))))) (define (run-postgresql-test) "Run tests in %POSTGRESQL-OS." diff --git a/gnu/tests/guix.scm b/gnu/tests/guix.scm index 6139e31cf0..ebee8d43af 100644 --- a/gnu/tests/guix.scm +++ b/gnu/tests/guix.scm @@ -83,6 +83,7 @@ (service dhcp-client-service-type) (service postgresql-service-type (postgresql-configuration + (postgresql postgresql-10) (config-file (postgresql-config-file (hba-file diff --git a/gnu/tests/monitoring.scm b/gnu/tests/monitoring.scm index 17b9edc3ac..7371b02fe1 100644 --- a/gnu/tests/monitoring.scm +++ b/gnu/tests/monitoring.scm @@ -307,7 +307,9 @@ zabbix||{} (let ((base-os (simple-operating-system (service dhcp-client-service-type) - (service postgresql-service-type) + (service postgresql-service-type + (postgresql-configuration + (postgresql postgresql-10))) (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 7513eab2e4..7f4518acd2 100644 --- a/gnu/tests/web.scm +++ b/gnu/tests/web.scm @@ -567,7 +567,9 @@ HTTP-PORT." (config (httpd-config-file (listen '("8080")))))) - (service postgresql-service-type) + (service postgresql-service-type + (postgresql-configuration + (postgresql postgresql-10))) (service patchwork-service-type (patchwork-configuration (patchwork patchwork) -- 2.28.0