Re: RFC: programmable file format for postgresql.conf

From: Álvaro Hernández Tortosa <aht(at)nosys(dot)es>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>, Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: RFC: programmable file format for postgresql.conf
Date: 2013-12-04 16:22:28
Message-ID: 529F56C4.7040605@nosys.es
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 04/12/13 16:51, Peter Eisentraut wrote:
> On 12/4/13, 1:42 AM, Álvaro Hernández Tortosa wrote:
>> IMHO, a data structure like the above would be completely
>> self-contained and allow any autoconfiguring tool or GUI tool to be
>> easily created, if the syntax is programmable. It would certainly make
>> the config file more verbose, but at the same time would help a lot of
>> users to configure postgres providing much more information.
>
> What you are describing appears to be isomorphic to XML and XML Schema.

I don't think XML would be a good idea. Even if it is both
programatically and humanly editable (two of the features I was
suggesting for it), it is messy and very verbose for this purpose.

> Note that you are not required to maintain your configuration data in a
> postgresql.conf-formatted file. You can keep it anywhere you like, GUI
> around in it, and convert it back to the required format. Most of the

I think it is not a very good idea to encourage GUI tools or tools to
auto-configure postgres to use a separate configuration file and then
convert it to postgresql.conf. That introduces a duplicity with evil
problems if either source of data is modified out-of-the-expected-way.

That's why I'm suggesting a config file that is, at the same time,
usable by both postgres and other external tools. That also enables
other features such as editing the config file persistently through a
SQL session.

> metadata is available through postgres --describe-config, which is the
> result of a previous attempt in this area, which never really went anywhere.
>
> It's not like there are a bunch of GUI and autotuning tools that people
> are dying to use or developers are dying to create, but couldn't because
> editing configuration files programmatically is hard.

It might be a chicken-and-egg problem. Maybe it's hard and futile to
write this config tools since postgresql.conf doesn't support the
required features. I don't know how to measure the "interest of people"
but I have seen many comments on this mailing list about features like
this. IMHO it would be a great addition :)

>
> Let's also not forget the two main use cases (arguably) of the
> configuration files: hand editing, and generation by configuration
> management tools. Anything that makes these two harder is not going to
> be well-received.

100% agreed :) That's why I suggested that the format of the config
file should adhere to the requisites a) to e) mentioned on my original
email (http://www.postgresql.org/message-id/529B8D01.6060301@nosys.es).

Would it be well-received a new file format that keeps it simple for
both hand editing and generation of the configuration, and at the same
time offers the features I have mentioned?

Thanks for your comments,

aht

--
Álvaro Hernández Tortosa

-----------
NOSYS
Networked Open SYStems

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2013-12-04 16:25:20 Re: Proposed feature: Selective Foreign Keys
Previous Message Albe Laurenz 2013-12-04 16:03:13 Re: FDW: possible resjunk columns in AddForeignUpdateTargets