all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#74058] [PATCH 0/2] [important] Set postgresql default value to #f and warn users.
@ 2024-10-28 10:56 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
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2024-10-28 10:56 UTC (permalink / raw)
  To: 74058; +Cc: Nicolas Graves

Nicolas Graves (2):
  gnu: postgresql-configuration: Set default postgresql to #f.
  etc: news: Warn users about postgresql default update.

 etc/news.scm               | 41 ++++++++++++++++++++++++++++++++++++++
 gnu/services/databases.scm | 10 +++++++---
 2 files changed, 48 insertions(+), 3 deletions(-)

-- 
2.46.0





^ permalink raw reply	[flat|nested] 3+ messages in thread

* [bug#74058] [PATCH 1/2] gnu: postgresql-configuration: Set default postgresql to #f.
  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 ` 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
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2024-10-28 11:13 UTC (permalink / raw)
  To: 74058; +Cc: Nicolas Graves

* gnu/services/databases.scm (postgresql-configuration)[postgresql]:
Set default to #f.
(postgresql-services): 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).
---
 gnu/services/databases.scm | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm
index 0933eb5e79..f8ae085339 100644
--- a/gnu/services/databases.scm
+++ b/gnu/services/databases.scm
@@ -167,8 +167,12 @@ (define contents
 (define-record-type* <postgresql-configuration>
   postgresql-configuration make-postgresql-configuration
   postgresql-configuration?
-  (postgresql         postgresql-configuration-postgresql ;file-like
-                      (default postgresql))
+  ;; Setting it to #f 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 or #f
+                      (default #f))
   (port               postgresql-configuration-port
                       (default 5432))
   (locale             postgresql-configuration-locale
@@ -346,7 +350,7 @@ (define postgresql-service-type
    (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





^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [bug#74058] [PATCH 2/2] etc: news: Warn users about postgresql default update.
  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   ` Nicolas Graves via Guix-patches via
  0 siblings, 0 replies; 3+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2024-10-28 11:13 UTC (permalink / raw)
  To: 74058; +Cc: Nicolas Graves

* etc/news.scm: Add entry.
---
 etc/news.scm | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/etc/news.scm b/etc/news.scm
index 4929fa2a9a..8dc209495a 100644
--- a/etc/news.scm
+++ b/etc/news.scm
@@ -25,6 +25,7 @@
 ;; Copyright © 2024 Vivien Kraus <vivien@planete-kraus.eu>
 ;; Copyright © 2024 Guillaume Le Vaillant <glv@posteo.net>
 ;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
+;; Copyright © 2024 Nicolas Graves <ngraves@ngraves.fr>
 ;;
 ;; Copying and distribution of this file, with or without modification, are
 ;; permitted in any medium without royalty provided the copyright notice and
@@ -33,6 +34,46 @@
 (channel-news
  (version 0)
 
+ (entry (commit "") ; fill-me based on the previous commit
+        (title (en "Postgresql service upgrade")
+               (fr "Mise à jour du service postgresql"))
+        (body
+         (en "This news entry concerns users of the postgresql-service-type.
+
+The default postgresql used in @code{postgresql-configuration} has been
+deprecated, and will be removed from Guix in a few months.  However, the value
+of the default @code{postgresql-configuration-postgresql} can't be directly
+changed to a newer major version of postgresql, because switching to a major
+version currently requires a manual update of the database.
+
+Because of this, the default value of postgresql-configuration-postgresql has
+been set to @code{#f}.  Current users of the service will have to set it
+manually.  If it was unset, use @code{postgresql-10} and plan an upgrade in the
+next month to a supported version of postgresql.  To upgrade, you will need to
+either dump your database using your previous version of postgresql and reload
+it in the new version or use the @command{pg_upgrade} application.  See
+@url{https://www.postgresql.org/docs/current/upgrading.html} for more
+info.")
+         (fr "Ce message concerne les utilisateurs du service-type postgresql.
+
+La précédente version par défaut de postgresql utilisée dans
+@code{postgresqsl-configuration} est obsolète et sera supprimée de Guix dans
+quelques mois.  Cependant, la valeur de la configuration par défaut
+@code{postgresql-configuration-postgresql} ne peut pas être changée
+directement pour une version majeure plus récente de postgresql, car le
+passage à une nouvelle version majeure nécessite actuellement une mise à jour
+manuelle de la base de données.
+
+Pour cette raison, la valeur par défaut de
+@code{postgresql-configuration-postgresql} est maintenant @code{#f} et les
+utilisateurs actuels du service doivent maintenant la configurer manuellement.
+Si elle n’était pas définie, utilisez @code{postgresql-10} et prévoyez une
+mise à jour dans le mois à venir vers une version plus récente de postgresql.
+Pour effectuer la mise à jour, vous devrez soit exporter votre base de données
+sous une version de postgresql puis la réimporter sous une nouvelle version,
+soit utiliser l'application @command{pg_upgrade}. Pour plus d'informations,
+consultez @url{https://www.postgresql.org/docs/current/upgrading.html}.")))
+
  (entry (commit "5966e0fdc78771c562e0f484a22f381a77908be0")
         (title
          (en "Daemon vulnerability allowing takeover of build users fixed")
-- 
2.46.0





^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-10-28 11:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.