unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Nicolas Graves via Guix-patches via <guix-patches@gnu.org>
To: 74058@debbugs.gnu.org
Cc: Nicolas Graves <ngraves@ngraves.fr>
Subject: [bug#74058] [PATCH v8 1/2] gnu: postgresql-configuration: Unset default postgresql.
Date: Sat, 16 Nov 2024 14:48:02 +0100	[thread overview]
Message-ID: <20241116134811.4660-1-ngraves@ngraves.fr> (raw)
In-Reply-To: <20241028105741.12834-1-ngraves@ngraves.fr>

* 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.
---
 doc/guix.texi              |  2 +-
 gnu/services/databases.scm | 10 ++++++----
 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 @@ (define contents
 (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 @@ (define postgresql-service-type
           (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))
-- 
2.46.0





  parent reply	other threads:[~2024-11-16 13:49 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-28 10:56 [bug#74058] [PATCH 0/2] [important] Set postgresql default value to #f and warn users Nicolas Graves via Guix-patches via
2024-10-28 11:13 ` [bug#74058] [PATCH 1/2] gnu: postgresql-configuration: Set default postgresql to #f Nicolas Graves via Guix-patches via
2024-10-28 11:13   ` [bug#74058] [PATCH 2/2] etc: news: Warn users about postgresql default update Nicolas Graves via Guix-patches via
2024-11-06 16:33     ` Ludovic Courtès
2024-11-06 16:29   ` [bug#74058] [PATCH 1/2] gnu: postgresql-configuration: Set default postgresql to #f Ludovic Courtès
2024-11-06 17:04 ` [bug#74058] [PATCH v2 1/2] gnu: postgresql-configuration: Set default postgresql to *no* Nicolas Graves via Guix-patches via
2024-11-06 17:04   ` [bug#74058] [PATCH v2 2/2] etc: news: Warn users about postgresql default update Nicolas Graves via Guix-patches via
2024-11-12  9:03   ` [bug#74058] [PATCH v2 1/2] gnu: postgresql-configuration: Set default postgresql to *no* Ludovic Courtès
2024-11-12  9:51     ` Nicolas Graves via Guix-patches via
2024-11-07 17:09 ` [bug#74058] [PATCH v3 " Nicolas Graves via Guix-patches via
2024-11-07 17:10   ` [bug#74058] [PATCH v3 2/2] etc: news: Warn users about postgresql default update Nicolas Graves via Guix-patches via
2024-11-08 11:18     ` pelzflorian (Florian Pelz)
2024-11-09 22:13       ` Nicolas Graves via Guix-patches via
2024-11-09 22:23 ` [bug#74058] [PATCH v4 1/2] gnu: postgresql-configuration: Set default postgresql to *no* Nicolas Graves via Guix-patches via
2024-11-09 22:23   ` [bug#74058] [PATCH v4 2/2] etc: news: Warn users about postgresql default update Nicolas Graves via Guix-patches via
2024-11-10  8:30     ` pelzflorian (Florian Pelz)
2024-11-13  9:17 ` [bug#74058] [PATCH v5 1/2] gnu: postgresql-configuration: Unset default postgresql Nicolas Graves via Guix-patches via
2024-11-13  9:19 ` [bug#74058] [PATCH v6 " Nicolas Graves via Guix-patches via
2024-11-13  9:19   ` [bug#74058] [PATCH v6 2/2] etc: news: Warn users about postgresql default update Nicolas Graves via Guix-patches via
2024-11-14 11:09     ` pelzflorian (Florian Pelz)
2024-11-15 11:03 ` [bug#74058] [PATCH v7 1/2] gnu: postgresql-configuration: Unset default postgresql Nicolas Graves via Guix-patches via
2024-11-15 11:03   ` [bug#74058] [PATCH v7 2/2] etc: news: Warn users about postgresql default update Nicolas Graves via Guix-patches via
2024-11-15 21:26   ` [bug#74058] [PATCH v7 1/2] gnu: postgresql-configuration: Unset default postgresql pelzflorian (Florian Pelz)
2024-11-16  0:06     ` Nicolas Graves via Guix-patches via
2024-11-16 13:48 ` Nicolas Graves via Guix-patches via [this message]
2024-11-16 13:48   ` [bug#74058] [PATCH v8 2/2] etc: news: Warn users about postgresql default update Nicolas Graves via Guix-patches via
2024-11-16 17:34   ` [bug#74058] [PATCH v8 1/2] gnu: postgresql-configuration: Unset default postgresql pelzflorian (Florian Pelz)
2024-11-16 20:24     ` bug#74058: " pelzflorian (Florian Pelz)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241116134811.4660-1-ngraves@ngraves.fr \
    --to=guix-patches@gnu.org \
    --cc=74058@debbugs.gnu.org \
    --cc=ngraves@ngraves.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).