Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wh9QB-0002Wc-2l for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Jul 2026 17:17:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wh9QA-001xJW-0x for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Jul 2026 17:17:23 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wh9Q9-001xJN-2U for pgsql-hackers@lists.postgresql.org; Tue, 07 Jul 2026 17:17:22 +0000 Received: from fhigh-b4-smtp.messagingengine.com ([202.12.124.155]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wh9Q8-000000001D0-0UlR for pgsql-hackers@lists.postgresql.org; Tue, 07 Jul 2026 17:17:21 +0000 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfhigh.stl.internal (Postfix) with ESMTP id C51B37A0047; Tue, 7 Jul 2026 13:17:18 -0400 (EDT) Received: from phl-imap-15 ([10.202.2.104]) by phl-compute-05.internal (MEProxy); Tue, 07 Jul 2026 13:17:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=partin.io; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1783444638; x=1783531038; bh=sQ0bioaS1TDMdSdokEO37eeLcF9qu6QbBTHMvu/fW/M=; b= Lr/awTAF/Mwl58hzdfdRh+C387dYGgIXks7gDSDnjTkH7M7DQ6ILbvbvUdi3iDUZ OuMN8v6tgkU9RR2n+HtKXYwbOL6a5ni+dfP1JuSvTvBHIGs5FhnFYmmyWQ7eo6I/ a/iip/EDhr69+YDUwusa1Qy1g5J1VKkCnnyAXdyLPA5hYa7/YcwNfsHa7COFufta OJcXmye8CEt69tRQIccUViigB5wiH7N8po3OVJgH1oi/6gosSYOdXuoEFCPm8Zml DWo+kvF3QzcGhGoJSMQPeqmnnKQGqYGeReQuVOuynjkV1WOVGz93PySUHmBDKQz6 txHG4Wm8TgLVyZzWgbt2NA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1783444638; x= 1783531038; bh=sQ0bioaS1TDMdSdokEO37eeLcF9qu6QbBTHMvu/fW/M=; b=N eUcjkjtmomFZJzs2KcH2NLulOoU4+QqJgYjoOuUcqsspeafgdyyL+OoXYrDhVYE9 uPamlP4KsHGd1x6Wsitxy1T06Ia3DZ7vWe5lsh9k2b+3BxninuKdgBUiwxbCXX3f j31eZKYwvGHfDARkUIBNslDl8jWK67iSL0zUHBBJ+h5Afnb+iNdytmZUkBXj5yMl CuqVIDotmWzL4ykuyeD3a79IQw4UuV8j9r3vEipCf9U3kfSClTqBDl4QP+NblBK0 N6QOtr4Kc+/dvF7Tcj/tO2KTeqV898NYSQ07A8qb2HnS+XwpTJ2jgo+MJJ00dahJ GRH/XuDpr9QobeyN0Pf9Q== X-ME-Sender: X-ME-Proxy-Cause: dmFkZTGNOy8039Ho3f1ppW30Y5DjKgB+z0OfIjp6b46FVNUYwXWRo18a4uD0Z514okN+2c bUCyvC0rwvfZM0yTCDlqllU7xeIDeL6/+4fVD0cxP7hG89F+ZM/3OCcDXFmO2En04KcjuK Gl4YABs+BFgMcSeJG7Ip3adURJsUyZ+SyUPzqK5SeEmHuOxE9WQidS5MYmfW8sENFCa0Xs Go3LEGhUw3N+ed7U5bbYl0sC55kXjZIOZnOp6NyrE1J2OKE4RliHd5q95F5fgzxBMhdVqJ zipYOAXS6NsXJ6bO4tcNfMWIR/bwFwFFTF8FcW7k/GA6XWW+mf0vN3xUfJY68Q6bE3NoGV Rt7qCTrupRB1vMiajcKj5KAB4x55Z84B1M5hi/os4pl8h7bZ4DkG3hKwofxfVtP7fOb0x2 Lb/03XzgYqMpgKAO7XtBrvWNgiyrjuOx0QKMOWyt+Qr3qtojL4ol9mjQ9rrdGyJZIku3ef TN5KOYzdkzDKipfftVwChp6ws6N5Mfg+NTwUXnrHVZUgzNiAfZV0ivhAzuNHOnzRYGlkFV wejsusZQgXvEAJzA9gKgV6U2ko3IwAAB7XC/nCAluQLgyciPEg+kEzDelFoqfhWcxsHXu/ KdiWAygb2Hz68QZkI9ycbC+ZDWKkBJc89+dCFlB8RKicqOqkwo0SBOyb0JAA X-ME-Proxy: Feedback-ID: idd01497b:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 1936D780AB9; Tue, 7 Jul 2026 13:17:18 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 07 Jul 2026 17:17:16 +0000 Message-Id: Cc: "PostgreSQL Hackers" Subject: Re: Proposal: new file format for hba/ident/hosts configuration? To: "Zsolt Parragi" From: "Tristan Partin" X-Mailer: aerc 0.21.0 References: In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue Jul 7, 2026 at 12:00 PM CDT, Zsolt Parragi wrote: > Hello hackers, > > [...] > > Is this a good idea in general? What does everyone think about the > current configuration style? Is it good enough, or should we try to > change it? I do not like it. I have created some VSCode extensions to help with=20 syntax highlighting, but I would enjoy deprecating those. > Moving on to more specific design questions, let's focus on the first poi= nt: > > Common, non-vendor-specific configuration formats are INI, XML, JSON, > YAML, and TOML. > > INI/conf is way too simple, and also not really a single standard, as > there are many different implementations. XML isn't that popular > anymore. Agree. > That leaves JSON/YAML/TOML. These all share one new requirement > compared to the current PostgreSQL config infrastructure, valid UTF-8, > but I don't think that could cause any practical problems. I think you have settled on 3 good options here. All of them support=20 JSON Schema[0], which is super useful in validating files. > YAML is complex, and has many unintuitive features. While it is quite > common, I don't think we would want to include a full YAML parser in > PostgreSQL, or try to write our own. We could try a limited YAML > format, dropping some complex/unsafe features, but that would be as > unintuitive as the current configuration formats, and could result in > compatibility issues with existing YAML tooling. Completely agree. > My initial choice for prototyping was JSON, and I ended up creating a > few prototypes for pg_hba with it. At first I liked it, but the more I > worked with it, the more I felt the JSON boilerplate hurt readability. > It's still a fine machine format, but I don't think it's a win for > humans editing config files by hand. Its obvious advantage is that we > already have a JSON parser in the code, and we could extend that to > handle the more human-friendly JSONC/JSON5 variants. Agree. > During pgconf.dev several people mentioned TOML when I talked about > the idea. Initially I dismissed it for mostly the same reason as > INI/conf, as I thought it was too simple. But when I decided to try > it, I actually liked it more than my JSON tests. It has a precise > specification and many libraries, so it is both easy to parse and > read. > > I'd like to focus on this now, on what a specific TOML configuration > could look like. (I am not saying it has to be TOML, it is just the > best option I've found so far, but if you have a better suggestion, > please share!) I like TOML, and it is quite popular. Another option is KDL:=20 https://kdl.dev/. Not saying that I think it should be used; only=20 mentioning it to give other options. I think the best option other than TOML is JSON5. > [...] [0]: https://json-schema.org/ --=20 Tristan Partin PostgreSQL Contributors Team AWS (https://aws.amazon.com)