From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id yD/PLcfRAmCyFAAA0tVLHw (envelope-from ) for ; Sat, 16 Jan 2021 11:45:11 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id GBG8KcfRAmCEZQAA1q6Kng (envelope-from ) for ; Sat, 16 Jan 2021 11:45:11 +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 BEDC99402B3 for ; Sat, 16 Jan 2021 11:45:10 +0000 (UTC) Received: from localhost ([::1]:57008 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0k0z-0007Zx-ES for larch@yhetil.org; Sat, 16 Jan 2021 06:45:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39998) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0k0s-0007Zj-49 for guix-patches@gnu.org; Sat, 16 Jan 2021 06:45:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:59208) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0k0r-0004dB-RH for guix-patches@gnu.org; Sat, 16 Jan 2021 06:45:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l0k0r-0000Rr-Os for guix-patches@gnu.org; Sat, 16 Jan 2021 06:45:01 -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: Sat, 16 Jan 2021 11:45:01 +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.16107974851684 (code B ref 45860); Sat, 16 Jan 2021 11:45:01 +0000 Received: (at 45860) by debbugs.gnu.org; 16 Jan 2021 11:44:45 +0000 Received: from localhost ([127.0.0.1]:42521 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0k0a-0000R5-K0 for submit@debbugs.gnu.org; Sat, 16 Jan 2021 06:44:44 -0500 Received: from mira.cbaines.net ([212.71.252.8]:48552) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0k0Y-0000Qv-2e for 45860@debbugs.gnu.org; Sat, 16 Jan 2021 06:44:43 -0500 Received: from localhost (188.29.101.63.threembb.co.uk [188.29.101.63]) by mira.cbaines.net (Postfix) with ESMTPSA id D957127BC13; Sat, 16 Jan 2021 11:44:40 +0000 (GMT) Received: from capella (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 6da6b17f; Sat, 16 Jan 2021 11:44:38 +0000 (UTC) References: <87h7nj4p3g.fsf@gnu.org> <87a6tb9o84.fsf@cbaines.net> <87v9byo9x2.fsf@gnu.org> User-agent: mu4e 1.4.14; emacs 27.1 From: Christopher Baines In-reply-to: <87v9byo9x2.fsf@gnu.org> Date: Sat, 16 Jan 2021 11:44:35 +0000 Message-ID: <87v9bx85ss.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: -2.96 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: BEDC99402B3 X-Spam-Score: -2.96 X-Migadu-Scanner: scn1.migadu.com X-TUID: sDL6kiCxoveT --=-=-= Content-Type: text/plain Mathieu Othacehe 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 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 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmAC0aNfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9XegJQ/6Ar2RV8Pc7iHq1LqnxdB6oyEky9Ud2U0/ jJMWC30pFBjkKpnDLZUyTfq8rmyaqSPKAWWsSN3iK4tFeYno4AHLnY36ZthzMJw6 IOyPgHl0pFD2iExxaLp1AZ/h4My7T1J9rIuevPvk4LIPWxvLu3dYyCjH2ai+DcOm qzTuF2uMDageHtRFad0HkSvd3nv9JwzhH4yzvL9PC8OzlowYdwcZq72ghtj49SUs 44dr3GLvbDZ8ZNltknui3Au10Lh8wB9LB52v5K89tHFq6hb5C9IocHDvjQ9gpdPh H11HCzIifDr712akpU9eps+mbmzvyVhV5/voA3VlC+AMHhxVa8O4owaJeZFENmL7 Mow96/Vl72E/OFxH80EpcF7S9uK7no6hWz6HL64InBjBZuNZUwcgRq7zB8Rd4BeB Y5rLQZLd/7uQ99pgo3Asds0Z0MmtH8FKr3hLJkPl2WgK9tUW5xPIq3cuwN1Lowr+ SQ62mbxkpbJKizkc13BlYjZ2kXZDIrpbV0V/aQCVB3zSQAJEBBf/MteSF+z93RBF LWwd/60kGBSlpq4RMOU6qvyMFloCdZacJ3qAR5ENF7gvFa/h2jplxzuxkUnouUp+ I6+dPpFgMPqI3Psh/0BTo3c5O8urWb813dra0eHg0g+8eG0lsda3HRPUjEH8wKNx XZKXXLWqkw8= =ZKyB -----END PGP SIGNATURE----- --=-=-=--