GNU bug report logs - #74058
[PATCH 0/2] [important] Set postgresql default value to #f and warn users.

Previous Next

Package: guix-patches;

Reported by: Nicolas Graves <ngraves <at> ngraves.fr>

Date: Mon, 28 Oct 2024 11:13:02 UTC

Severity: normal

Tags: patch

Done: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>

Bug is archived. No further changes may be made.

Full log


Message #47 received at 74058 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Nicolas Graves <ngraves <at> ngraves.fr>
Cc: 74058 <at> debbugs.gnu.org
Subject: Re: [bug#74058] [PATCH v2 1/2] gnu: postgresql-configuration: Set
 default postgresql to *no*.
Date: Tue, 12 Nov 2024 10:03:08 +0100
Hi,

Nicolas Graves <ngraves <at> ngraves.fr> skribis:

> * 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:

> 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’.




This bug report was last modified 264 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.