From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id oMEWKK2ytWQpZQAASxT56A (envelope-from ) for ; Mon, 17 Jul 2023 23:29:17 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id sAUtJ62ytWRDrwAAG6o9tA (envelope-from ) for ; Mon, 17 Jul 2023 23:29:17 +0200 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 3519A4A14F for ; Mon, 17 Jul 2023 23:29:17 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=baulig.is header.s=protonmail2 header.b="MGy/T7Ix"; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=baulig.is ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1689629357; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=v7Idt0g46lVq/oN3HuzgP+1N/w/KJr+81hTYcuP9izA=; b=DTPAyFRnqJpP/90RUBJCPjRsnTfuCzEI7o4liGrdsf8vYyd9u0S5O+sSEZeAQn3xUhhG9i HdGFWVry+D3CfM+uG0WDjD3FRb5O5y0sqGEb3jIHbd8QT+epMEaz+AAHusCMRvF2EwqtI9 6e+wjH9o4+6WB6Iu2C5r86JXkvzKj9TV/byw6TG4NjiJrsS2eKN23DKYV1G6/FoGvoQOwZ Mtvtri0YO/o3UDrk76y/fNJF76YFyOCKqEAVTwCdkufsERuTEg95EoHofzqjkmq9qPCYA+ jcRLDOrNiWiKYBmWJZs3dbqpCtddgjQyCxD5kzpfMAtvLFhraQ1qvN/9qFr5wQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1689629357; a=rsa-sha256; cv=none; b=psLcoWGzcosPQTiUdSc8Ln/vZ/gfbgcmLcZTJPaKGJpz/KVJxxTFmz/T2el/zeqWGwd4Hd zEam33G62tmdloojD13XHgIt7DaUKaCAuxCPqIHJk1Xx7MUcoxqgll7LXf/NM8nGeTiaKP iXX0XdK1upeRLC6A3rgzAAKoFAcTC0BeqbMWOSBHPl1359RmjubHSIBJPrxHLsoQgO/eRU UcjFWWRb0Kf+UVE8ROeIAMeJ5fTPtV5NaK22mVWanjeJFkIDMxWqDgVxYWKAC6BVlZQ4Jm XzFWGF3Ht6gSj68Pw13v03IPYQPw9BLpfkqrE4NJlt6UsJzmP0Cy0d/dGZAuaw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=baulig.is header.s=protonmail2 header.b="MGy/T7Ix"; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=baulig.is Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qLVlq-00018o-Sz; Mon, 17 Jul 2023 17:28:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qLVlp-00018f-L6 for guix-devel@gnu.org; Mon, 17 Jul 2023 17:28:41 -0400 Received: from mail-4018.proton.ch ([185.70.40.18]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qLVll-0006Cu-Ni for guix-devel@gnu.org; Mon, 17 Jul 2023 17:28:41 -0400 Date: Mon, 17 Jul 2023 21:28:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baulig.is; s=protonmail2; t=1689629313; x=1689888513; bh=v7Idt0g46lVq/oN3HuzgP+1N/w/KJr+81hTYcuP9izA=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=MGy/T7IxBCFHFIqXiLj3sFUyyA6gNKqLimLCzjTVpRWKZO+DtsUh6TrR6Jll1H4f0 1Ce+OZiwnLnfLF9b4J+Dnv9G+bnLKu4gvuKeo26wojYTQtIGPSPeQ2MIbMIu3ykYug r+NqbHiMWiKkI8zIhO3WpVkuD0CY3nb0nsK4JMbXtpyts8b1+PmO/1OQaYUXlneu/Y 3GTfm8+tfqJLyYTZ90nV/9qR1BnFVYBicSGlh7bL/rrxnOCJTaJS/3rbiqTxvQCAq9 DBvh2fmMoTcYRKorg/TRoxEETc06tGvogx042beZ8u9jyEIVzlgDNypNQlvMGwAjR2 Gx5MvxuWq0DZg== To: Felix Lechner From: Martin Baulig Cc: "guix-devel@gnu.org" Subject: Re: Postgres user UID and GID Message-ID: In-Reply-To: References: Feedback-ID: 66823742:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.40.18; envelope-from=martin@baulig.is; helo=mail-4018.proton.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -7.36 X-Spam-Score: -7.36 X-Migadu-Queue-Id: 3519A4A14F X-Migadu-Scanner: mx1.migadu.com X-TUID: IiLQ45oU4g8V Hello, I had considered idmap before, but realized there might be a bit of a chick= en-egg problem with it. Even though that likely doesn't actually exist bec= ause GNU Guix is smart enough about it, the circular dependency still feels= weird: What I mean is that the NFS client would depend on the existence of the 'po= stgres' user, to put it into the idmap file, and to resolve its UID / GID o= n service startup. But the PostgreSQL service also depends on the NFS share already being moun= ted, so the postgres process can access its data directory. The only clean solution I could think about is to create the account during= system initialization via an explicit entry in (operating-system (users ..= .)). But then I won't need idmap because I can just hard-code the UID and = GID there. About running the database on the server - unfortunately, there is no offic= ial package for Synology's DSM and I don't feel good about some third-party= sites that only provide binaries. They also made some custom changes to t= he Linux kernel and use some kind of custom libc - it's a nightmare to inst= all anything on that thing! And the "official" recommendation that you get on Reddit, Stack Overflow, e= tc. about running PostgreSQL on Synology DSM is to install a Docker image. I figured running GNU Guix in a VM to be a much better choice than messing = with a bunch of Docker images. Best regards, Martin ------- Original Message ------- On Monday, July 17th, 2023 at 8:23 PM, Felix Lechner wrote: >=20 >=20 > Hi Martin, >=20 > On Mon, Jul 17, 2023 at 11:44=E2=80=AFAM Martin Baulig martin@baulig.is w= rote: >=20 > > I have decided to NFS-mount an encrypted shared folder >=20 >=20 > I use a similar setup and use Gocryptfs for encryption. How do you > encrypt, please? >=20 > > there is a tiny little problem with PostgreSQL: > > the UID and GID of the 'postgres' user needs to match that of the serve= r. >=20 >=20 > Perhaps I do not understand the needs of your setup completely. > Doesn't 'idmapd' in NFSv4 address your conundrum effectively? >=20 > For performance reasons, I would discourage such a setup, though. It > would be better to run Postgres on the NAS, if it is an option, or to > replicate the database for backup purposes. >=20 > Kind regards > Felix