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


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

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

> Hello,
>
> Here's a patch to improve PostgreSQL service. It merges
> <postgresql-configuration> and <postgresql-config-file> records. It also
> sanitises parameters conversion and logging.
>
> Thanks,
>
> Mathieu
> From 87703b749631acd8ddc2b9eeb36a5be7189a019b Mon Sep 17 00:00:00 2001
> From: Mathieu Othacehe <othacehe <at> gnu.org>
> Date: Thu, 14 Jan 2021 14:13:30 +0100
> Subject: [PATCH] Improve PostgreSQL service.
>
> Merge <postgresql-configuration> and <postgresql-config-file> records,
> sanitize parameters convertion and logging.
>
> * gnu/services/databases.scm (postgresql-config-file,
> postgresql-config-file?, postgresql-config-file-log-destination,
> postgresql-config-file-hba-file, postgresql-config-file-ident-file,
> postgresql-config-file-extra-config, postgresql-configuration): Remove them.
> (postgresql-configuration-log-destination,
> postgresql-configuration-hba-file,
> postgresql-configuration-ident-file,
> postgresql-configuration-socket-directory,
> postgresql-configuration-extra-config,
> postgresql-configuration-extension-packages): New exported procedures.
> (<postgresql-config-file>): Merge it with ...
> (<postgresql-configuration>): ... this record, and add a "socket-directory"
> field.
> (postgresql-config-file-compiler): Replace it with ...
> (postgresql-config-file): ... this procedure.
> (postgresql-activation): Use "match-record" instead of "match". Create the
> "socket-directory" if needed.
> (postgresql-shepherd-service): Use "match-record" intead of "match". Pass the
> "log-destination" argument to "pg_ctl" if needed.
> (postgresql-service): Remove it.
> * gnu/tests/databases.scm (%postgresql-log-directory): New variable.
> (%postgresql-os): Pass "log-destination" and "extra-config" fields.
> (log-file): New test case.
> * gnu/tests/guix.scm (%guix-data-service-os): Adapt accordingly.
> * doc/guix.texi (Database Services): Ditto.

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?
[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.