Re: Advice regarding configuration parameters

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: "Thomas Hallgren" <thhal(at)mailblocks(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Advice regarding configuration parameters
Date: 2004-02-06 16:01:09
Message-ID: 383.1076083269@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Am Freitag, 6. Februar 2004 10:27 schrieb Thomas Hallgren:
>> I would like some configuration parameters to Pl/Java and I would like some
>> advice. Where should they go?
>>
>> 1. Something similar to postgresql.conf (it's not extendable though, is
>> it?)

> No, it is not.

In principle it could be --- the mechanisms already exist in guc.c to
permit outside agents to add variables. The difficulty in having a PL
handler add such variables is that there is no good way to get the
handler to run before postgresql.conf is scanned for the first time,
and if it isn't then GUC will error out on the "unknown" variable name.

> I have been thinking for some time about a generic mechanism to
> configure procedural languages. It could be a text array in
> pg_language that you could fill at will.

If we had a mechanism that allowed "unrecognized" variable names in
postgresql.conf to be saved and reprocessed later, we could allow PLs
and other dynamically-loaded libraries to be configured via ordinary GUC
variables, which would be much nicer than a special-purpose mechanism.
Of course this would have a negative impact on the ability to detect
plain old misspellings in the config file. Perhaps we could have a
compromise that says that specially formed variable names, maybe like
"pljava::myparam", are allowed to escape the normal error check.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2004-02-06 17:07:43 Re: Advice regarding configuration parameters
Previous Message Jan Wieck 2004-02-06 15:07:58 Re: [HACKERS] Sync vs. fsync during checkpoint