Re: proposal: a validator for configuration files

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Alexey Kluykin <alexk(at)commandprompt(dot)com>, Florian Pflug <fgp(at)phlo(dot)org>, Selena Deckelmann <selena(at)chesnok(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal: a validator for configuration files
Date: 2011-07-18 14:38:53
Message-ID: 2803.1310999933@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Sun, Jul 17, 2011 at 12:59 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> I agree custom_variable_classes is conceptually messy, but it's a
>> reasonably lightweight compromise that gives some error checking without
>> requiring a lot of possibly-irrelevant extensions to be loaded into
>> every postgres process.

> Hmm. Maybe what we need is a mechanism that allows the configuration
> to be associated a loadable module, and whenever that module is
> loaded, we also load the associated configuration settings. This is
> probably terribly syntax, but something like:

> ALTER LOAD 'plpgsql' SET plpgsql.variable_conflict = 'whatever';

> AFAICS, that would remove the need to set variables in postgresql.conf
> that can't be validated, and so we could just disallow it.

No, that only fixes things for the case of setting a variable in the
control file. It isn't useful for ALTER ROLE/DATABASE SET. And it
still has the problem of forcing every process to load every extension,
and as written it would also require the postmaster to read catalogs.

> OTOH, maybe that's more trouble than can be justified by the size of
> the problem.

Yeah.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-07-18 14:51:04 Re: Reduced power consumption in WAL Writer process
Previous Message Michael Meskes 2011-07-18 14:38:11 pgsql: Made ecpglib write double with a precision of 15 digits.