[PATCH 0/2] [important] Set postgresql default value to #f and warn users.

  • Done
  • quality assurance status badge
Details
3 participants
  • Ludovic Courtès
  • Nicolas Graves
  • pelzflorian (Florian Pelz)
Owner
unassigned
Submitted by
Nicolas Graves
Severity
normal
N
N
Nicolas Graves wrote on 28 Oct 11:56 +0100
(address . guix-patches@gnu.org)(name . Nicolas Graves)(address . ngraves@ngraves.fr)
20241028105741.12834-1-ngraves@ngraves.fr
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
N
N
Nicolas Graves wrote on 28 Oct 12:13 +0100
[PATCH 2/2] etc: news: Warn users about postgresql default update.
(address . 74058@debbugs.gnu.org)(name . Nicolas Graves)(address . ngraves@ngraves.fr)
20241028111340.17913-2-ngraves@ngraves.fr
* etc/news.scm: Add entry.
---
etc/news.scm | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)

Toggle diff (61 lines)
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
N
N
Nicolas Graves wrote on 28 Oct 12:13 +0100
[PATCH 1/2] gnu: postgresql-configuration: Set default postgresql to #f.
(address . 74058@debbugs.gnu.org)(name . Nicolas Graves)(address . ngraves@ngraves.fr)
20241028111340.17913-1-ngraves@ngraves.fr
* 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(-)

Toggle diff (30 lines)
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
L
L
Ludovic Courtès wrote on 6 Nov 17:29 +0100
(name . Nicolas Graves)(address . ngraves@ngraves.fr)(address . 74058@debbugs.gnu.org)
87a5ecwck8.fsf@gnu.org
Hi,

Nicolas Graves <ngraves@ngraves.fr> skribis:

Toggle quote (3 lines)
> * gnu/services/databases.scm (postgresql-configuration)[postgresql]:
> Set default to #f.
> (postgresql-services): Revert default to postgresql-10 (rationale: We
^
No ‘s’.

Toggle quote (12 lines)
> (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))

How about having *no* default value in that case? That way, existing
user configs will just fail to build, forcing users to act on it.
(Leaving it to #f would instead result in obscure backtraces.)

Ludo’.
L
L
Ludovic Courtès wrote on 6 Nov 17:33 +0100
Re: [bug#74058] [PATCH 2/2] etc: news: Warn users about postgresql default update.
(name . Nicolas Graves)(address . ngraves@ngraves.fr)(address . 74058@debbugs.gnu.org)
871pzowce5.fsf@gnu.org
Nicolas Graves <ngraves@ngraves.fr> skribis:

Toggle quote (2 lines)
> * etc/news.scm: Add entry.

Nice.

Toggle quote (6 lines)
> + (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.

s/the postgresql-service-type/@code{postgresql-service-type}/

Toggle quote (2 lines)
> +The default postgresql used in @code{postgresql-configuration} has been

When used as a noun, I believe the correct spelling is “PostgreSQL”
(this needs to be changed throughout).

Toggle quote (2 lines)
> +deprecated, and will be removed from Guix in a few months. However, the value

s/from Guix//

Toggle quote (13 lines)
> +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.")

Would be nice if this could be automated, although automation for this
kind of thing is a double-edge sword…

I find the instructions clear enough though, +1!

Ludo’.
N
N
Nicolas Graves wrote on 6 Nov 18:04 +0100
[PATCH v2 1/2] gnu: postgresql-configuration: Set default postgresql to *no*.
(address . 74058@debbugs.gnu.org)(name . Nicolas Graves)(address . ngraves@ngraves.fr)
20241106170439.22888-1-ngraves@ngraves.fr
* gnu/services/databases.scm (postgresql-configuration)[postgresql]:
Set default to *no*.
(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).
---
gnu/services/databases.scm | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

Toggle diff (29 lines)
diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm
index 0933eb5e79..05e2c5f996 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?
+ ;; Setting it to *no* 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
- (default postgresql))
+ (default *no*))
(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
N
N
Nicolas Graves wrote on 6 Nov 18:04 +0100
[PATCH v2 2/2] etc: news: Warn users about postgresql default update.
(address . 74058@debbugs.gnu.org)(name . Nicolas Graves)(address . ngraves@ngraves.fr)
20241106170439.22888-2-ngraves@ngraves.fr
* etc/news.scm: Add entry.
---
etc/news.scm | 43 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)

Toggle diff (63 lines)
diff --git a/etc/news.scm b/etc/news.scm
index 4929fa2a9a..1dc8e64a72 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,48 @@
(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 @code{postgresql-service-type}.
+
+The default PostgreSQL used in @code{postgresql-configuration} has been
+deprecated, and will be removed 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{*no*}. 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 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{*no*} et les
+utilisateurs actuels du service doivent 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
N
N
Nicolas Graves wrote on 7 Nov 18:09 +0100
[PATCH v3 1/2] gnu: postgresql-configuration: Set default postgresql to *no*.
(address . 74058@debbugs.gnu.org)(name . Nicolas Graves)(address . ngraves@ngraves.fr)
20241107171006.14868-1-ngraves@ngraves.fr
* gnu/services/databases.scm (postgresql-configuration)[postgresql]:
Set default to *no*.
(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).
---
gnu/services/databases.scm | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

Toggle diff (29 lines)
diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm
index 0933eb5e79..c499356c3a 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?
+ ;; Setting it to '*no* 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
- (default postgresql))
+ (default '*no*))
(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
N
N
Nicolas Graves wrote on 7 Nov 18:10 +0100
[PATCH v3 2/2] etc: news: Warn users about postgresql default update.
(address . 74058@debbugs.gnu.org)(name . Nicolas Graves)(address . ngraves@ngraves.fr)
20241107171006.14868-2-ngraves@ngraves.fr
* etc/news.scm: Add entry.
---
etc/news.scm | 43 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)

Toggle diff (63 lines)
diff --git a/etc/news.scm b/etc/news.scm
index 4929fa2a9a..078adeefb1 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,48 @@
(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 @code{postgresql-service-type}.
+
+The default PostgreSQL used in @code{postgresql-configuration} has been
+deprecated, and will be removed 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{'*no*}. 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 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{'*no*} et les
+utilisateurs actuels du service doivent 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
P
P
pelzflorian (Florian Pelz) wrote on 8 Nov 12:18 +0100
(name . Nicolas Graves)(address . ngraves@ngraves.fr)(address . 74058@debbugs.gnu.org)
878qtudlef.fsf@pelzflorian.de
Hello Nicolas, thank you for taking care of making PostgreSQL current.
I tried to test with `make check-system TESTS="patchwork"`, but it
fails even without your change.

Anyway.

Can you include this German translation?

Toggle quote (3 lines)
> (entry (commit "") ; fill-me based on the previous commit
> (title (en "PostgreSQL service upgrade")

(de "PostgreSQL-Dienst aktualisiert")


Toggle quote (20 lines)
> (fr "Mise à jour du service PostgreSQL"))
> (body
> (en "\
> This news entry concerns users of the @code{postgresql-service-type}.
>
> The default PostgreSQL used in @code{postgresql-configuration} has been
> deprecated, and will be removed 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{'*no*}. 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.")

(de "Diese Neuigkeit betrifft Nutzer des @code{postgresql-service-type}.

Die in @code{postgresql-configuration} bisher vorgegebene Version von gilt als
veraltet und wird in ein paar Monaten entfernt werden. Allerdings können wir
den Vorgabewert von @code{postgresql-configuration-postgresql} nicht einfach
für Sie auf eine neuere große Version ändern, weil bei so einem Wechsel die
Datenbank derzeit manuell aktualisiert werden muss.

Aus diesem Grund wurde der Vorgabewert von
@code{postgresql-configuration-postgresql} von nun an auf @code{'*no*} gesetzt.
Aktuelle Nutzer des Dienstes müssen sie selbst setzen. Wenn kein Wert gesetzt
war, sollten Sie @code{postgresql-10} eintragen und dabei einplanen, dass Sie
es kommenden Monat auf eine unterstützte Version von PostgreSQL aktualisieren
müssen. Zum Aktualisieren werden Sie entweder mit der vorherigen Version von
PostgreSQL ein Dump Ihrer Datenbank exportieren, das Sie dann in der neuen
Version laden, oder Sie benutzen dafür die Anwendung @command{pg_upgrade}.
Informationen.")



Furthermore, for the French version:


Toggle quote (17 lines)
> (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 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{'*no*} et les
> utilisateurs actuels du service doivent 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.

In the last sentence, « version plus récente » should be supported version.




Toggle quote (6 lines)
> 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}.")))

Regards,
Florian
N
N
Nicolas Graves wrote on 9 Nov 23:13 +0100
(name . pelzflorian (Florian Pelz))(address . pelzflorian@pelzflorian.de)(address . 74058@debbugs.gnu.org)
87v7wwnji2.fsf@ngraves.fr
On 2024-11-08 12:18, pelzflorian (Florian Pelz) wrote:

Toggle quote (4 lines)
> Hello Nicolas, thank you for taking care of making PostgreSQL current.
> I tried to test with `make check-system TESTS="patchwork"`, but it
> fails even without your change.

I've also checked that it fails even before
351fdf69f737d09d24499d6c1ff70a2325fff0fa, so I'm considering this out of
scope. We should probably open an issue though. It fails with a 500
during the http-get test.

Toggle quote (4 lines)
> Anyway.
>
> Can you include this German translation?

Thanks a lot Florian, adding it now.

[...]

Toggle quote (2 lines)
> In the last sentence, « version plus récente » should be supported version.

Indeed, this is actually not that easy to translate, "version supportée"
sounds awful in French. Maybe "version prise en charge" but that doesn't
sound natural either. Will try to find something more suitable.

--
Best regards,
Nicolas Graves
N
N
Nicolas Graves wrote on 9 Nov 23:23 +0100
[PATCH v4 1/2] gnu: postgresql-configuration: Set default postgresql to *no*.
(address . 74058@debbugs.gnu.org)(name . Nicolas Graves)(address . ngraves@ngraves.fr)
20241109222341.18811-1-ngraves@ngraves.fr
* gnu/services/databases.scm (postgresql-configuration)[postgresql]:
Set default to *no*.
(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).
---
gnu/services/databases.scm | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

Toggle diff (29 lines)
diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm
index 0933eb5e79..c499356c3a 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?
+ ;; Setting it to '*no* 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
- (default postgresql))
+ (default '*no*))
(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
N
N
Nicolas Graves wrote on 9 Nov 23:23 +0100
[PATCH v4 2/2] etc: news: Warn users about postgresql default update.
(address . 74058@debbugs.gnu.org)
20241109222341.18811-2-ngraves@ngraves.fr
* etc/news.scm: Add entry.

Co-authored-by: Florian Pelz <pelzflorian@pelzflorian.de>
---
etc/news.scm | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 64 insertions(+)

Toggle diff (84 lines)
diff --git a/etc/news.scm b/etc/news.scm
index 4929fa2a9a..ba1f204b08 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,69 @@
(channel-news
(version 0)
+ (entry (commit "") ;TODO fill it based on the previous commit
+ (title (en "PostgreSQL service upgrade")
+ (de "PostgreSQL-Dienst aktualisiert")
+ (fr "Mise à jour du service PostgreSQL"))
+ (body
+ (en "\
+This news entry concerns users of the @code{postgresql-service-type}.
+
+The default PostgreSQL used in @code{postgresql-configuration} has been
+deprecated, and will be removed 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{'*no*}. 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.")
+ (de "\
+Diese Neuigkeit betrifft Nutzer des @code{postgresql-service-type}.
+
+Die in @code{postgresql-configuration} bisher vorgegebene Version von gilt als
+veraltet und wird in ein paar Monaten entfernt werden. Allerdings können wir
+den Vorgabewert von @code{postgresql-configuration-postgresql} nicht einfach
+für Sie auf eine neuere große Version ändern, weil bei so einem Wechsel die
+Datenbank derzeit manuell aktualisiert werden muss.
+
+Aus diesem Grund wurde der Vorgabewert von
+@code{postgresql-configuration-postgresql} von nun an auf @code{'*no*}
+gesetzt. Aktuelle Nutzer des Dienstes müssen sie selbst setzen. Wenn kein
+Wert gesetzt war, sollten Sie @code{postgresql-10} eintragen und dabei
+einplanen, dass Sie es kommenden Monat auf eine unterstützte Version von
+PostgreSQL aktualisieren müssen. Zum Aktualisieren werden Sie entweder mit
+der vorherigen Version von PostgreSQL ein Dump Ihrer Datenbank exportieren,
+das Sie dann in der neuen Version laden, oder Sie benutzen dafür die Anwendung
+@command{pg_upgrade}. Siehe
+@url{https://www.postgresql.org/docs/current/upgrading.html} für weitere
+Informationen.")
+ (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 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 prise en charge 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{'*no*} et les
+utilisateurs actuels du service doivent 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
P
P
pelzflorian (Florian Pelz) wrote on 10 Nov 09:30 +0100
(name . Nicolas Graves)(address . ngraves@ngraves.fr)(address . 74058@debbugs.gnu.org)
871pzjze1h.fsf@pelzflorian.de
Hello Nicolas.

Nicolas Graves <ngraves@ngraves.fr> writes:
Toggle quote (5 lines)
> + (de "\
> +Diese Neuigkeit betrifft Nutzer des @code{postgresql-service-type}.
> +
> +Die in @code{postgresql-configuration} bisher vorgegebene Version von gilt als

Ooops; I deleted a word; should be:

Toggle quote (2 lines)
> +Die in @code{postgresql-configuration} bisher vorgegebene Version von PostgreSQL gilt als

Sorry!

Nicolas Graves <ngraves@ngraves.fr> writes:
Toggle quote (5 lines)
> I've also checked that it fails even before
> 351fdf69f737d09d24499d6c1ff70a2325fff0fa, so I'm considering this out of
> scope. We should probably open an issue though. It fails with a 500
> during the http-get test.

It happened sometime this year. But I will not work on it now and I see
there are a few other open test-suite bugs already, so I will not open
the new bug:



Regards,
Florian
L
L
Ludovic Courtès wrote on 12 Nov 10:03 +0100
Re: [bug#74058] [PATCH v2 1/2] gnu: postgresql-configuration: Set default postgresql to *no*.
(name . Nicolas Graves)(address . ngraves@ngraves.fr)(address . 74058@debbugs.gnu.org)
871pzgvn77.fsf@gnu.org
Hi,

Nicolas Graves <ngraves@ngraves.fr> skribis:

Toggle quote (25 lines)
> * gnu/services/databases.scm (postgresql-configuration)[postgresql]:
> Set default to *no*.
> (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).
> ---
> gnu/services/databases.scm | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm
> index 0933eb5e79..05e2c5f996 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?
> + ;; Setting it to *no* 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
> - (default postgresql))
> + (default *no*))

I think we misunderstood each other; when I wrote:

Toggle quote (2 lines)
> How about having *no* default value in that case?

I suggested removing the (default …) bit altogether, as in:

(define-record-type* <postgresql-configuration>
postgresql-configuration make-postgresql-configuration
postgresql-configuration?
(postgresql postgresql-configuration-postgresql) ;no default value
…)

That way, users get a syntax error (at macro-expansion time) if they
omit the ‘postgresql’ field.

Does that make sense?

Ludo’.
N
N
Nicolas Graves wrote on 12 Nov 10:51 +0100
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 74058@debbugs.gnu.org)
87a5e46aqb.fsf@ngraves.fr
On 2024-11-12 10:03, Ludovic Courtès wrote:

Toggle quote (3 lines)
>
> I think we misunderstood each other; when I wrote:

Big indeed ;)

Toggle quote (15 lines)
>> How about having *no* default value in that case?
>
> I suggested removing the (default …) bit altogether, as in:
>
> (define-record-type* <postgresql-configuration>
> postgresql-configuration make-postgresql-configuration
> postgresql-configuration?
> (postgresql postgresql-configuration-postgresql) ;no default value
> …)
>
> That way, users get a syntax error (at macro-expansion time) if they
> omit the ‘postgresql’ field.
>
> Does that make sense?

Yep, will resend a version.

--
Best regards,
Nicolas Graves
N
N
Nicolas Graves wrote on 13 Nov 10:17 +0100
[PATCH v5 1/2] gnu: postgresql-configuration: Unset default postgresql.
(address . 74058@debbugs.gnu.org)(name . Nicolas Graves)(address . ngraves@ngraves.fr)
20241113091729.24715-1-ngraves@ngraves.fr
* gnu/services/databases.scm (postgresql-configuration)[postgresql]:
Unset default.
(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).
---
gnu/services/databases.scm | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

Toggle diff (29 lines)
diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm
index 0933eb5e79..001f96830e 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
@@ -346,7 +349,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
N
N
Nicolas Graves wrote on 13 Nov 10:19 +0100
[PATCH v6 1/2] gnu: postgresql-configuration: Unset default postgresql.
(address . 74058@debbugs.gnu.org)(name . Nicolas Graves)(address . ngraves@ngraves.fr)
20241113091922.25376-1-ngraves@ngraves.fr
* gnu/services/databases.scm (postgresql-configuration)[postgresql]:
Unset default.
(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).
---
gnu/services/databases.scm | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

Toggle diff (29 lines)
diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm
index 0933eb5e79..001f96830e 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
@@ -346,7 +349,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
N
N
Nicolas Graves wrote on 13 Nov 10:19 +0100
[PATCH v6 2/2] etc: news: Warn users about postgresql default update.
(address . 74058@debbugs.gnu.org)
20241113091922.25376-2-ngraves@ngraves.fr
* etc/news.scm: Add entry.

Co-authored-by: Florian Pelz <pelzflorian@pelzflorian.de>
---
etc/news.scm | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 63 insertions(+)

Toggle diff (83 lines)
diff --git a/etc/news.scm b/etc/news.scm
index fbf16615df..116fa0c43b 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,68 @@
(channel-news
(version 0)
+ (entry (commit "") ;TODO fill it based on the previous commit
+ (title (en "PostgreSQL service upgrade")
+ (de "PostgreSQL-Dienst aktualisiert")
+ (fr "Mise à jour du service PostgreSQL"))
+ (body
+ (en "\
+This news entry concerns users of the @code{postgresql-service-type}.
+
+The default PostgreSQL used in @code{postgresql-configuration} has been
+deprecated, and will be removed 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 unset. 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.")
+ (de "\
+Diese Neuigkeit betrifft Nutzer des @code{postgresql-service-type}.
+
+Die in @code{postgresql-configuration} bisher vorgegebene Version von
+PostgreSQL gilt als veraltet und wird in ein paar Monaten entfernt werden.
+Allerdings können wir den Vorgabewert von
+@code{postgresql-configuration-postgresql} nicht einfach für Sie auf eine
+neuere große Version ändern, weil bei so einem Wechsel die Datenbank derzeit
+manuell aktualisiert werden muss.
+
+Aus diesem Grund wurde der Vorgabewert von
+@code{postgresql-configuration-postgresql} von nun an entfernt. Aktuelle
+Nutzer des Dienstes müssen sie selbst setzen. Wenn kein Wert gesetzt war,
+sollten Sie @code{postgresql-10} eintragen und dabei einplanen, dass Sie es
+kommenden Monat auf eine unterstützte Version von PostgreSQL aktualisieren
+müssen. Zum Aktualisieren werden Sie entweder mit der vorherigen Version von
+PostgreSQL ein Dump Ihrer Datenbank exportieren, das Sie dann in der neuen
+Version laden, oder Sie benutzen dafür die Anwendung @command{pg_upgrade}.
+Siehe @url{https://www.postgresql.org/docs/current/upgrading.html} für weitere
+Informationen.")
+ (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 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 prise en charge 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} a été supprimée et les utilisateurs
+actuels du service doivent 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 "cfc85eb0c67a5cf10a3fbe2531b926cbb8c62489")
(title
(en "Linux-libre 6.10 removed due to end of upstream support")
--
2.46.0
P
P
pelzflorian (Florian Pelz) wrote on 14 Nov 12:09 +0100
(name . Nicolas Graves)(address . ngraves@ngraves.fr)(address . 74058@debbugs.gnu.org)
87ttcaoyv6.fsf@pelzflorian.de
News LGTM (thank you for updating the German). IIUC, doc/guix.texi
still contains:
Toggle quote (4 lines)
> @table @asis
> @item @code{postgresql} (default: @code{postgresql})
> PostgreSQL package to use for the service.

Could you remove this default, like anonip-service-type also
has no default in its input field:
Toggle quote (8 lines)
> @table @asis
> @item @code{anonip} (default: @code{anonip})
> The anonip package to use.
>
> @item @code{input}
> The file name of the input log file to process. The service creates a
> FIFO of this name. The web server should write its logs to this FIFO.

Regards,
Florian
N
N
Nicolas Graves wrote on 15 Nov 12:03 +0100
[PATCH v7 1/2] gnu: postgresql-configuration: Unset default postgresql.
(address . 74058@debbugs.gnu.org)(name . Nicolas Graves)(address . ngraves@ngraves.fr)
20241115110352.14249-1-ngraves@ngraves.fr
* gnu/services/databases.scm (postgresql-configuration)[postgresql]:
Unset default.
(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 | 9 ++++++---
2 files changed, 7 insertions(+), 4 deletions(-)

Toggle diff (42 lines)
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..001f96830e 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
@@ -346,7 +349,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
N
N
Nicolas Graves wrote on 15 Nov 12:03 +0100
[PATCH v7 2/2] etc: news: Warn users about postgresql default update.
(address . 74058@debbugs.gnu.org)
20241115110352.14249-2-ngraves@ngraves.fr
* etc/news.scm: Add entry.

Co-authored-by: Florian Pelz <pelzflorian@pelzflorian.de>
---
etc/news.scm | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 63 insertions(+)

Toggle diff (83 lines)
diff --git a/etc/news.scm b/etc/news.scm
index fbf16615df..116fa0c43b 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,68 @@
(channel-news
(version 0)
+ (entry (commit "") ;TODO fill it based on the previous commit
+ (title (en "PostgreSQL service upgrade")
+ (de "PostgreSQL-Dienst aktualisiert")
+ (fr "Mise à jour du service PostgreSQL"))
+ (body
+ (en "\
+This news entry concerns users of the @code{postgresql-service-type}.
+
+The default PostgreSQL used in @code{postgresql-configuration} has been
+deprecated, and will be removed 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 unset. 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.")
+ (de "\
+Diese Neuigkeit betrifft Nutzer des @code{postgresql-service-type}.
+
+Die in @code{postgresql-configuration} bisher vorgegebene Version von
+PostgreSQL gilt als veraltet und wird in ein paar Monaten entfernt werden.
+Allerdings können wir den Vorgabewert von
+@code{postgresql-configuration-postgresql} nicht einfach für Sie auf eine
+neuere große Version ändern, weil bei so einem Wechsel die Datenbank derzeit
+manuell aktualisiert werden muss.
+
+Aus diesem Grund wurde der Vorgabewert von
+@code{postgresql-configuration-postgresql} von nun an entfernt. Aktuelle
+Nutzer des Dienstes müssen sie selbst setzen. Wenn kein Wert gesetzt war,
+sollten Sie @code{postgresql-10} eintragen und dabei einplanen, dass Sie es
+kommenden Monat auf eine unterstützte Version von PostgreSQL aktualisieren
+müssen. Zum Aktualisieren werden Sie entweder mit der vorherigen Version von
+PostgreSQL ein Dump Ihrer Datenbank exportieren, das Sie dann in der neuen
+Version laden, oder Sie benutzen dafür die Anwendung @command{pg_upgrade}.
+Siehe @url{https://www.postgresql.org/docs/current/upgrading.html} für weitere
+Informationen.")
+ (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 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 prise en charge 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} a été supprimée et les utilisateurs
+actuels du service doivent 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 "cfc85eb0c67a5cf10a3fbe2531b926cbb8c62489")
(title
(en "Linux-libre 6.10 removed due to end of upstream support")
--
2.46.0
P
P
pelzflorian (Florian Pelz) wrote on 15 Nov 22:26 +0100
Re: [bug#74058] [PATCH v7 1/2] gnu: postgresql-configuration: Unset default postgresql.
(name . Nicolas Graves)(address . ngraves@ngraves.fr)(address . 74058@debbugs.gnu.org)
87y11kdw7y.fsf@pelzflorian.de
Hello Nicolas. I had not tried previously and did not use postgres, but
now I applied patch 1/2 to my local guix.git checkout and pull from it
and `guix pull` gives an error in the default value of
(define postgresql-service-type:



$ gzip -cd /var/log/guix/drvs/hr/8iqk1a4pkchbayr4x4mlm7za2kwxyn-guix-system.drv.gz
[ 7/ 50] loading..... 28.0% of 25 filesice-9/psyntax.scm:2824:12: In procedure syntax-violation:
Syntax error:
gnu/services/databases.scm:349:18: postgresql-configuration: missing field initializers (postgresql) in form (postgresql-configuration)


Maybe the default value needs to be adapted;
or maybe I am missing some prerequisite patch if pull works for you.

Regards,
Florian
N
N
Nicolas Graves wrote on 16 Nov 01:06 +0100
(name . pelzflorian (Florian Pelz))(address . pelzflorian@pelzflorian.de)(address . 74058@debbugs.gnu.org)
871pzc59fy.fsf@ngraves.fr
On 2024-11-15 22:26, pelzflorian (Florian Pelz) wrote:

Toggle quote (19 lines)
> Hello Nicolas. I had not tried previously and did not use postgres, but
> now I applied patch 1/2 to my local guix.git checkout and pull from it
> and `guix pull` gives an error in the default value of
> (define postgresql-service-type:
>
>
>
> $ gzip -cd /var/log/guix/drvs/hr/8iqk1a4pkchbayr4x4mlm7za2kwxyn-guix-system.drv.gz
> [ 7/ 50] loading..... 28.0% of 25 filesice-9/psyntax.scm:2824:12: In procedure syntax-violation:
> Syntax error:
> gnu/services/databases.scm:349:18: postgresql-configuration: missing field initializers (postgresql) in form (postgresql-configuration)
>
>
> Maybe the default value needs to be adapted;
> or maybe I am missing some prerequisite patch if pull works for you.
>
> Regards,
> Florian

Thought I pulled properly, I'll retry. Thanks for pointing that out.
Toggle quote (4 lines)
>
>
>

--
Best regards,
Nicolas Graves
N
N
Nicolas Graves wrote on 16 Nov 14:48 +0100
[PATCH v8 1/2] gnu: postgresql-configuration: Unset default postgresql.
(address . 74058@debbugs.gnu.org)(name . Nicolas Graves)(address . ngraves@ngraves.fr)
20241116134811.4660-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(-)

Toggle diff (45 lines)
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
N
N
Nicolas Graves wrote on 16 Nov 14:48 +0100
[PATCH v8 2/2] etc: news: Warn users about postgresql default update.
(address . 74058@debbugs.gnu.org)
20241116134811.4660-2-ngraves@ngraves.fr
* etc/news.scm: Add entry.

Co-authored-by: Florian Pelz <pelzflorian@pelzflorian.de>
---
etc/news.scm | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 63 insertions(+)

Toggle diff (83 lines)
diff --git a/etc/news.scm b/etc/news.scm
index fbf16615df..116fa0c43b 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,68 @@
(channel-news
(version 0)
+ (entry (commit "") ;TODO fill it based on the previous commit
+ (title (en "PostgreSQL service upgrade")
+ (de "PostgreSQL-Dienst aktualisiert")
+ (fr "Mise à jour du service PostgreSQL"))
+ (body
+ (en "\
+This news entry concerns users of the @code{postgresql-service-type}.
+
+The default PostgreSQL used in @code{postgresql-configuration} has been
+deprecated, and will be removed 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 unset. 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.")
+ (de "\
+Diese Neuigkeit betrifft Nutzer des @code{postgresql-service-type}.
+
+Die in @code{postgresql-configuration} bisher vorgegebene Version von
+PostgreSQL gilt als veraltet und wird in ein paar Monaten entfernt werden.
+Allerdings können wir den Vorgabewert von
+@code{postgresql-configuration-postgresql} nicht einfach für Sie auf eine
+neuere große Version ändern, weil bei so einem Wechsel die Datenbank derzeit
+manuell aktualisiert werden muss.
+
+Aus diesem Grund wurde der Vorgabewert von
+@code{postgresql-configuration-postgresql} von nun an entfernt. Aktuelle
+Nutzer des Dienstes müssen sie selbst setzen. Wenn kein Wert gesetzt war,
+sollten Sie @code{postgresql-10} eintragen und dabei einplanen, dass Sie es
+kommenden Monat auf eine unterstützte Version von PostgreSQL aktualisieren
+müssen. Zum Aktualisieren werden Sie entweder mit der vorherigen Version von
+PostgreSQL ein Dump Ihrer Datenbank exportieren, das Sie dann in der neuen
+Version laden, oder Sie benutzen dafür die Anwendung @command{pg_upgrade}.
+Siehe @url{https://www.postgresql.org/docs/current/upgrading.html} für weitere
+Informationen.")
+ (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 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 prise en charge 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} a été supprimée et les utilisateurs
+actuels du service doivent 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 "cfc85eb0c67a5cf10a3fbe2531b926cbb8c62489")
(title
(en "Linux-libre 6.10 removed due to end of upstream support")
--
2.46.0
P
P
pelzflorian (Florian Pelz) wrote on 16 Nov 18:34 +0100
Re: [bug#74058] [PATCH v8 1/2] gnu: postgresql-configuration: Unset default postgresql.
(name . Nicolas Graves)(address . ngraves@ngraves.fr)(address . 74058@debbugs.gnu.org)
87a5dzccb0.fsf@pelzflorian.de
Nicolas Graves via Guix-patches via <guix-patches@gnu.org> writes:
Toggle quote (3 lines)
> -(define-deprecated (postgresql-service #:key (postgresql postgresql)
> +(define-deprecated (postgresql-service #:key (postgresql postgresql-10)

Hello Nicolas. Sorry, another issue.

As it should be, after createdb in `guix shell postgresql@14`, reconfigure with

(service postgresql-service-type)

gives the error

guix system: Fehler: /etc/config.scm:72:21: no value specified for service of type 'postgresql'

; I change it to

(service postgresql-service-type
(postgresql-configuration
(postgresql postgresql-10)))

and reconfigure works again, but after rebooting,

sudo herd status

shows postgres has failed to start.

/var/log/postgresql/pg_ctl.log contains:

2024-11-15 20:37:27.366 GMT [32375] LOG: ending log output to stderr
2024-11-15 20:37:27.366 GMT [32375] HINT: Future log output will go to log destination "syslog".
2024-11-16 08:06:09.690 GMT [342] LOG: ending log output to stderr
2024-11-16 08:06:09.690 GMT [342] HINT: Future log output will go to log destination "syslog".
2024-11-16 11:48:56.075 GMT [344] LOG: ending log output to stderr
2024-11-16 11:48:56.075 GMT [344] HINT: Future log output will go to log destination "syslog".
2024-11-16 16:41:19.144 GMT [347] FATAL: database files are incompatible with server
2024-11-16 16:41:19.144 GMT [347] DETAIL: The data directory was initialized by PostgreSQL version 14, which is not compatible with this version 10.23.


Should we set the default to postgresql-14 and change /etc/news.scm to
recommend version 14, or instead recommend looking for an error in file
/var/log/postgresql/pg_ctl.log?

I used `guix shell postgresql@14` because it’s the version I get with
`guix build -e '(@ (gnu packages databases) postgresql)'`. Was that
wrong?

Regards,
Florian
P
P
pelzflorian (Florian Pelz) wrote on 16 Nov 21:24 +0100
(name . Nicolas Graves)(address . ngraves@ngraves.fr)(address . 74058-done@debbugs.gnu.org)
87y11jrkoi.fsf@pelzflorian.de
Pushed as b93434e656eba4260df82158a96c295000d3ff44.

Ohh Nicolas, I just saw the guix-devel thread which caused you to make
the patch.


Sorry for the misunderstanding!

Regards,
Florian
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 74058@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 74058
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch