GNU bug report logs - #45860
Improve PostgreSQL service.

Previous Next

Package: guix-patches;

Reported by: Mathieu Othacehe <othacehe <at> gnu.org>

Date: Thu, 14 Jan 2021 13:37:02 UTC

Severity: normal

Done: Mathieu Othacehe <othacehe <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Christopher Baines <mail <at> cbaines.net>
To: Mathieu Othacehe <othacehe <at> gnu.org>
Cc: 45860 <at> debbugs.gnu.org
Subject: [bug#45860] Improve PostgreSQL service.
Date: Sat, 16 Jan 2021 11:44:35 +0000
[Message part 1 (text/plain, inline)]
Mathieu Othacehe <othacehe <at> gnu.org> writes:

> Hello Chris,
>
>> I haven't read through these changes in detail, but the mixing of the
>> record describing the config file, and the record for configuring the
>> service introduces the limitation that you can no longer specify any
>> lowerable object (like a file) or something like a string to use a
>> config file outside of the store. Did you have a reason for mixing the
>> records together?
>
> I must admit I overlooked that possibility. The reason for merging the
> records is that the "log-destination" is now needed both to enable
> "pg_ctl" logging in "postgresql-shepherd-service" and in
> "postgresql-config-file" to be written in PostgreSQL configuration.
>
> Plus having a record called <postgresql-configuration> that does not
> contain some of the configuration field feels weird.
>
> Is passing a lowerable config file a use case of yours? In that case I
> could still add a "raw-config" field to override the configuration file
> creation.

It's not, however given I'm able to make changes to the service
definition, that's what I generally do when I have a problem with it,
rather than sidestepping the Guix configuration layer. It's hard to tell
if anyone is doing that or not.

This pattern of using a record with a gexp-compiler is used for quite a
few services now, but mostly because I've implemented quite a few
services (I think there's one case where someone else did similarly).

I get that there's some value in trying to help users by creating the
relevant directory for logs, but I'm not sure it requires all these
changes.

I'm also unsure about using the same names for configuration parameters,
but picking different semantics. log-destination [1] can be a list
(comma separated string), which I reasonably could be "stderr,syslog" or
'(stderr syslog) in the Guix configuration (just as an example), and
with the service changes proposed here the string value would mean that
log_directory gets set to "stderr,syslog" which seems wrong.

1: https://www.postgresql.org/docs/13/runtime-config-logging.html#GUC-LOG-DESTINATION
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 4 years and 119 days ago.

Previous Next


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