Re: Configuring synchronous replication

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Thom Brown <thom(at)linux(dot)com>, Dave Page <dpage(at)pgadmin(dot)org>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Configuring synchronous replication
Date: 2010-09-22 08:47:03
Message-ID: 4C99C287.7080307@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On 09/22/2010 04:18 AM, Heikki Linnakangas wrote:
> On 21/09/10 18:12, Tom Lane wrote:
>> Heikki Linnakangas<heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
>>> On 21/09/10 11:52, Thom Brown wrote:
>>>> My fear would be standby.conf would be edited by users who don't
>>>> really know XML and then we'd have 3 different styles of config to
>>>> tell the user to edit.
>>
>>> I'm not a big fan of XML either.
>>> ...
>>> Then again, maybe we should go with something like json or yaml
>>
>> The fundamental problem with all those "machine editable" formats is
>> that they aren't "people editable". If you have to have a tool (other
>> than a text editor) to change a config file, you're going to be very
>> unhappy when things are broken at 3AM and you're trying to fix it
>> while ssh'd in from your phone.
>
> I'm not very familiar with any of those formats, but I agree it needs
> to be easy to edit by hand first and foremost.
>
>> I think the "ini file" format suggestion is probably a good one; it
>> seems to fit this problem, and it's something that people are used to.
>> We could probably shoehorn the info into a pg_hba-like format, but
>> I'm concerned about whether we'd be pushing that format beyond what
>> it can reasonably handle.
>
> The ini file format seems to be enough for the features proposed this
> far, but I'm a bit concerned that even that might not be flexible
> enough for future features. I guess we'll cross the bridge when we get
> there and go with an ini file for now. It should be possible to extend
> it in various ways, and in the worst case that we have to change to a
> completely different format, we can provide a how to guide on
> converting existing config files to the new format.

The ini file format is not flexible enough, IMNSHO. If we're going to
adopt a new config file format it should have these characteristics,
among others:

* well known (let's not invent a new one)
* supports hierarchical structure
* reasonably readable

I realize that the last is very subjective. Personally, I'm very
comfortable with XML, but then I do a *lot* of work with it, and have
for many years. I know I'm in a minority on that, and some people just
go bananas when they see it. Since we're just about to add a JSON parser
to the backend, by the look of it, that looks like a reasonable bet.
Maybe it uses a few too many quotes, but that's not really so hard to
get your head around, even if it offends you a bit aesthetically. And it
is certainly fairly widely known.

cheers

andrew

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Dave Page 2010-09-22 08:54:51 Re: Configuring synchronous replication
Previous Message Markus Wanner 2010-09-22 08:21:10 Re: Configuring synchronous replication

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2010-09-22 08:47:36 Re: snapshot generation broken
Previous Message Heikki Linnakangas 2010-09-22 08:43:06 Standby registration