Subject: [bug#74058] [PATCH 1/2] gnu: postgresql-configuration: Set default postgresql to #f.

From: Ludovic Courtès <[email-masked]>
Date: Wed, 06 Nov 2024 17:29:27 +0100

Hi,

Nicolas Graves <[email-masked]> skribis:

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

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