Re: Custom gucs visibility - Mailing list pgsql-hackers

From Nikhil Sontakke
Subject Re: Custom gucs visibility
Date
Msg-id CANgU5ZdFsWF7rByVCDm1PpvqUdnJLZDr-ZD9JOKHWuB6WuWFRQ@mail.gmail.com
Whole thread Raw
In response to Re: Custom gucs visibility  (David Fetter <david@fetter.org>)
List pgsql-hackers


 
> > If we haven't loaded the .so yet, where would we get the list of
> > custom GUCs from?
>
> This has come up before.  We could show the string value of the GUC,
> if it's been set in postgresql.conf, but we do not have correct
> values for any of the other columns in pg_settings; nor are we even
> sure that the module will think the value is valid once it does get
> loaded.  So the consensus has been that allowing the GUC to be
> printed would be more misleading than helpful.

How about printing them with something along the lines of, "Please
load extension foobar for details" or (less informative, but possibly
easier to code) "libfoobar.so not loaded." ?


Well, we have done the "CREATE EXTENSION" successfully earlier. Also, the GUC becomes "automagically" visible after the backend has executed a function from that extension ( in which case the .so gets loaded as part of the function handling).

Also note that SET foo.custom_guc works ok by setting up a placeholder guc if the .so has not been loaded yet.

I wonder if we should dare to try to load the .so if a 'SHOW extension_name.custom_guc' is encountered via internal_load_library or something? Obviously we should check if the extension was created before as well.

Regards,
Nikhils

 
Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review])
Next
From: Pavel Stehule
Date:
Subject: Re: proposal: simple date constructor from numeric values