summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicolas Graves via Guix-patches via <guix-patches@gnu.org>2024-11-16 14:48:02 +0100
committerFlorian Pelz <pelzflorian@pelzflorian.de>2024-11-16 18:13:02 +0100
commitb93434e656eba4260df82158a96c295000d3ff44 (patch)
treef5d369865d2090c714691d8ee97dfbe3010d0acd
parentb647d3a149c94ee84cde1af3af7442633afa3416 (diff)
downloadguix-b93434e656eba4260df82158a96c295000d3ff44.tar.gz
gnu: postgresql-configuration: Unset default postgresql.
* gnu/services/databases.scm (postgresql-configuration)[postgresql]:
Unset default.
(postgresql-service-type): Remove default-value.
(postgresql-service): Revert default to postgresql-10 (rationale: We
can remove this service at the same time than postgresql-10, in
something like 6 months to a year).
* doc/guix.texi: Remove postgresql default reference in documentation.

Signed-off-by: Florian Pelz <pelzflorian@pelzflorian.de>
-rw-r--r--doc/guix.texi2
-rw-r--r--gnu/services/databases.scm10
2 files changed, 7 insertions, 5 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 2ab78d6237..ba4bd2cc79 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -26247,7 +26247,7 @@ Data type representing the configuration for the
 @code{postgresql-service-type}.
 
 @table @asis
-@item @code{postgresql} (default: @code{postgresql})
+@item @code{postgresql}
 PostgreSQL package to use for the service.
 
 @item @code{port} (default: @code{5432})
diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm
index 0933eb5e79..e8a4acc996 100644
--- a/gnu/services/databases.scm
+++ b/gnu/services/databases.scm
@@ -167,8 +167,11 @@ host	all	all	::1/128 	md5"))
 (define-record-type* <postgresql-configuration>
   postgresql-configuration make-postgresql-configuration
   postgresql-configuration?
-  (postgresql         postgresql-configuration-postgresql ;file-like
-                      (default postgresql))
+  ;; Setting no default ensures that the user sets its current postgresql
+  ;; explicitely.  Since major upgrades currently require a manual migration
+  ;; of the database, this way the user is responsible for upgrading properly.
+  ;; MAYBE TODO: Write an action to automatically upgrade in Guix.
+  (postgresql         postgresql-configuration-postgresql) ;file-like
   (port               postgresql-configuration-port
                       (default 5432))
   (locale             postgresql-configuration-locale
@@ -343,10 +346,9 @@ host	all	all	::1/128 	md5"))
           (service-extension
            profile-service-type
            (compose list postgresql-configuration-postgresql))))
-   (default-value (postgresql-configuration))
    (description "Run the PostgreSQL database server.")))
 
-(define-deprecated (postgresql-service #:key (postgresql postgresql)
+(define-deprecated (postgresql-service #:key (postgresql postgresql-10)
                                        (port 5432)
                                        (locale "en_US.utf8")
                                        (config-file (postgresql-config-file))