guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 07/19: services: postgresql: Add default package.


From: Christopher Baines
Subject: Re: 07/19: services: postgresql: Add default package.
Date: Thu, 04 May 2023 09:11:07 +0100
User-agent: mu4e 1.8.13; emacs 28.2

Ludovic Courtès <ludo@gnu.org> writes:

> Christopher Baines <mail@cbaines.net> skribis:
>
>> guix-commits@gnu.org writes:
>>
>>> civodul pushed a commit to branch master
>>> in repository guix.
>>>
>>> commit e45306c1982aee194243cf661295c7ca776d879f
>>> Author: Ludovic Courtès <ludo@gnu.org>
>>> AuthorDate: Thu Apr 20 10:38:37 2023 +0200
>>>
>>>     services: postgresql: Add default package.
>>>     
>>>     * gnu/services/databases.scm (<postgresql-configuration>)[postgresql]:
>>>     Add default value, moved from...
>>>     (postgresql-service-type)[default-value]: ... here.
>>> ---
>>>  gnu/services/databases.scm | 6 +++---
>>>  1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> The default was removed a few years ago [1] and I don't think there's
>> been a significant change (like supporting automatic upgrading existing
>> databases between versions) in the service since then.
>>
>> 1: 
>> https://git.savannah.gnu.org/cgit/guix.git/commit/?id=bdcf4d88d58798eca7811c8b1fbd4638168d05c3
>
> Oh, my bad.  I found it weird that the default value would be found in
> the service and not in the configuration object.  The result is that
> there is a default value, just not where you’d expect it.
>
> But yeah, I understand the rationale of the commit above, so we should
> probably revert to that and add a comment explaining why there’s no
> default.
>
> I wonder how we can make sure that users can still write (say):
>
>   (service cuirass-service-type)
>
> without having to explicitly specify which postgresql version they want
> to use.
>
> WDYT?

Yeah, we're just moving the problem of matching up the PostgreSQL
software and data at the moment, but I think it's still preferable to
make the problem clear in the configuration and when reconfiguring
rather than delaying things to when the service doesn't start.

It would be good to at least have some Guix specific documentation on
how to migrate from one PostgreSQL version to another, and ideally this
could be integrated in to the service somehow. That's the blocking issue
to providing defaults here, we're just setting the user up for the
service not starting at some point in the future when we change the
default version of PostgreSQL.

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]