guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

05/05: services: databases: Don't specify a default postgresql version.


From: guix-commits
Subject: 05/05: services: databases: Don't specify a default postgresql version.
Date: Tue, 20 Oct 2020 18:40:02 -0400 (EDT)

cbaines pushed a commit to branch master
in repository guix.

commit bdcf4d88d58798eca7811c8b1fbd4638168d05c3
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Fri Oct 2 19:15:44 2020 +0100

    services: databases: Don't specify a default postgresql version.
    
    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.
    
    * gnu/services/databases.scm (<postgresql-configuration>): Remove default 
for
    postgresql.
    (postgresql-service-type): Remove the default value.
    * gnu/tests/databases.scm (%postgresql-os): Update accordingly.
    * gnu/tests/guix.scm (%guix-data-service-os): Update accordingly.
    * gnu/tests/monitoring.scm (%zabbix-os): Update accordingly.
    * gnu/tests/web.scm (patchwork-os): Update accordingly.
    * doc/guix.texi (PostgreSQL): Update accordingly.
---
 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 582ab0f..05111d4 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -18457,7 +18457,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
@@ -18483,7 +18485,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 7908a3e..d7b4594 100644
--- a/gnu/services/databases.scm
+++ b/gnu/services/databases.scm
@@ -147,8 +147,7 @@ host        all     all     ::1/128         md5"))
 (define-record-type* <postgresql-configuration>
   postgresql-configuration make-postgresql-configuration
   postgresql-configuration?
-  (postgresql         postgresql-configuration-postgresql ;<package>
-                      (default postgresql))
+  (postgresql         postgresql-configuration-postgresql) ;<package>
   (port               postgresql-configuration-port
                       (default 5432))
   (locale             postgresql-configuration-locale
@@ -279,8 +278,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))))))
 
 (define-deprecated (postgresql-service #:key (postgresql postgresql)
                                        (port 5432)
diff --git a/gnu/tests/databases.scm b/gnu/tests/databases.scm
index e0544bb..d3045cc 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 20b67d5..af7d8f0 100644
--- a/gnu/tests/guix.scm
+++ b/gnu/tests/guix.scm
@@ -156,6 +156,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 17b9edc..7371b02 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 7513eab..7f4518a 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]