From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id AB2wDza+AGALFAAA0tVLHw (envelope-from ) for ; Thu, 14 Jan 2021 21:57:10 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id cEibCza+AGDXXwAAB5/wlQ (envelope-from ) for ; Thu, 14 Jan 2021 21:57:10 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id F11F99403D6 for ; Thu, 14 Jan 2021 21:57:09 +0000 (UTC) Received: from localhost ([::1]:58174 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0Ac8-0006dO-Mm for larch@yhetil.org; Thu, 14 Jan 2021 16:57:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49442) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0Ac2-0006dG-Da for guix-patches@gnu.org; Thu, 14 Jan 2021 16:57:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:56180) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0Ac2-000550-6L for guix-patches@gnu.org; Thu, 14 Jan 2021 16:57:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l0Ac2-0007zR-62 for guix-patches@gnu.org; Thu, 14 Jan 2021 16:57:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45860] Improve PostgreSQL service. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 14 Jan 2021 21:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45860 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Mathieu Othacehe Received: via spool by 45860-submit@debbugs.gnu.org id=B45860.161066141330696 (code B ref 45860); Thu, 14 Jan 2021 21:57:02 +0000 Received: (at 45860) by debbugs.gnu.org; 14 Jan 2021 21:56:53 +0000 Received: from localhost ([127.0.0.1]:39493 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0Abs-0007z2-MP for submit@debbugs.gnu.org; Thu, 14 Jan 2021 16:56:52 -0500 Received: from mira.cbaines.net ([212.71.252.8]:53206) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0Abq-0007yt-8q for 45860@debbugs.gnu.org; Thu, 14 Jan 2021 16:56:51 -0500 Received: from localhost (188.29.101.63.threembb.co.uk [188.29.101.63]) by mira.cbaines.net (Postfix) with ESMTPSA id 1A2BF27BC11; Thu, 14 Jan 2021 21:56:49 +0000 (GMT) Received: from capella (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id dc3063b6; Thu, 14 Jan 2021 21:56:46 +0000 (UTC) References: <87h7nj4p3g.fsf@gnu.org> User-agent: mu4e 1.4.14; emacs 27.1 From: Christopher Baines In-reply-to: <87h7nj4p3g.fsf@gnu.org> Date: Thu, 14 Jan 2021 21:56:43 +0000 Message-ID: <87a6tb9o84.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 45860@debbugs.gnu.org Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -4.46 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: F11F99403D6 X-Spam-Score: -4.46 X-Migadu-Scanner: scn1.migadu.com X-TUID: L3Mpm8K07fC1 --=-=-= Content-Type: text/plain Mathieu Othacehe writes: > Hello, > > Here's a patch to improve PostgreSQL service. It merges > and records. It also > sanitises parameters conversion and logging. > > Thanks, > > Mathieu > From 87703b749631acd8ddc2b9eeb36a5be7189a019b Mon Sep 17 00:00:00 2001 > From: Mathieu Othacehe > Date: Thu, 14 Jan 2021 14:13:30 +0100 > Subject: [PATCH] Improve PostgreSQL service. > > Merge and 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. > (): Merge it with ... > (): ... 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? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmAAvhtfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9XcdsA/+LgX1i2Ue74w12mYSxTEnfsArIY5c1M2q 4fiTsNKPYyAjl5LOS8xYGguEC2dyXxjdJxhuTmJAUTaaglf8eewwAsAavipbPrNw J9rGITtlb2uSVaxox2IUpF1KaVFLyGKBxvCiOe6Th2zV2lP1cSTjRHPgjAmd3+gQ EPvL9w7IG5RXJUCMcJ6TuHZTUYpvO2OvBouEZT8CU7Gj1UGBkj9z+mx0e/7QPyBR XV4MrBhrJg8nSRt8VoZBWrFnVhlhHuvJZ6zimSctgsC18p8sL+1qeIdHtR8l54YP 7wC5ae4wdWlAGjG9A353E0m22rhzvoph654EUOldLmtWHo4uQcNwgi2NqZEPLAtk oFD9LJNxL2Usu1fFxBuRSygiHH4qpS3uy6hFpFwDXLhu1Tgv1F1rslx/AsUOn5f2 2AwgBomzjWXGKPymuBRK7p07OIqERXM9Cx37e+9ipKyJg1qW68IZFvFACvkYsy1v dN+2oPAwAjOClUjoLdVFRMsRXbJiu9sEPB0iwGRqTIhm9MeZkDnjpfyjp4dbnjku /PEOftgw0c8DP3iXt99D7XRaAFHzlMs99JmklB0eW0xU3t+jcc5JmH5Q8tVLY7Q0 q1fuHZpKI/xQw/GWUD3NGhpdci+viLJuww4wlUTDFZr0q4zRkQ5KK0+0mxYNdI8T 1mUeEMh1NJc= =2m4f -----END PGP SIGNATURE----- --=-=-=--