Re: [RFC] Extend namespace of valid guc names

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [RFC] Extend namespace of valid guc names
Date: 2013-10-03 18:39:46
Message-ID: CA+TgmoYuOAgn-GwjuK85bo9nKpGr-4ncL3zq1CDWw3sg==P8JQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Sep 23, 2013 at 9:36 AM, Alvaro Herrera
<alvherre(at)2ndquadrant(dot)com> wrote:
> I think the idea that we should consider a different way of handling
> tabular configuration data has merit. In fact, how much sense does it
> make to have these options (the ones for which this patch is being
> written) be GUCs in the first place? ALTER USER/DATABASE don't work for
> them, they can't be usefully changed in the commandline, there's no
> working SET.
>
> If we had some way to plug these into pg_hba.conf parsing machinery
> (which is tabular data), I would suggest that. But that doesn't sound
> really sensible. I think the idea of putting this configuratio data
> in a separate file, and perhaps a more convenient format than
> three-level GUC options, should be considered.

All very good points, IMHO. In a lot of cases, what you want is

sneazle.list='foo,bar'
sneazle.foo.prop1='zatz'
sneazle.bar.prop1='frotz'
etc.

But that means that the set of GUCs that exist to be SET needs to
change every time sneazle.list changes, and we haven't got any good
mechanism for that. I really think we're trying to squeeze a square
peg into a round hole here, and I accordingly propose to mark this
patch rejected.

It seems to me that if an extension wants to read and parse a
configuration file in $PGDATA, it doesn't need any special core
support for that. If there's enough consistency in terms of what
those configuration files look like across various extensions, we
might choose to provide a set of common tools in core to help parse
them. But I'm not too convinced any useful pattern will emerge.

Another option is to store the data in an actual table. One could
have sneazle.configtable='dbname.schemaname.tablename', for example.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2013-10-03 18:43:54 Re: GIN improvements part 1: additional information
Previous Message Peter Geoghegan 2013-10-03 18:28:04 Re: record identical operator