Lists: | pgsql-hackers |
---|
From: | Joshua Tolley <eggyknap(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Making pg_config and pg_controldata output available via SQL |
Date: | 2010-02-03 19:13:31 |
Message-ID: | 4b69caeb.9513f30a.731a.3427@mx.google.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
I'd really like to see the data from pg_config and pg_controldata available
through SQL, such as by adding output to pg_show_all_settings(), or adding new
SRFs named something like pg_config() and pg_controldata(). Does this make as
much sense to the rest of the world as it does to me? In particular it's
useful to be able to find $libdir without requiring pg_config, as some
packagers tend not to include it in anything put the -dev packages, but all
those settings seem useful to have on hand, and in at least most cases
shouldn't be tough to expose via SQL. Comments?
--
Joshua Tolley / eggyknap
End Point Corporation
http://www.endpoint.com
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Joshua Tolley <eggyknap(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Making pg_config and pg_controldata output available via SQL |
Date: | 2010-02-03 19:32:47 |
Message-ID: | 1883.1265225567@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Joshua Tolley <eggyknap(at)gmail(dot)com> writes:
> I'd really like to see the data from pg_config and pg_controldata available
> through SQL, such as by adding output to pg_show_all_settings(), or adding new
> SRFs named something like pg_config() and pg_controldata(). Does this make as
> much sense to the rest of the world as it does to me? In particular it's
> useful to be able to find $libdir without requiring pg_config, as some
> packagers tend not to include it in anything put the -dev packages, but all
> those settings seem useful to have on hand, and in at least most cases
> shouldn't be tough to expose via SQL. Comments?
I wonder whether there's a security issue there. Telling an attacker
whether you've been built with feature X seems like possibly useful
info that he couldn't otherwise get without local machine access.
In particular, we already try to avoid exposing server filesystem
path information.
regards, tom lane
From: | Joshua Tolley <eggyknap(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Making pg_config and pg_controldata output available via SQL |
Date: | 2010-02-03 21:06:17 |
Message-ID: | 4b69e55b.0637560a.582d.ffff917c@mx.google.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Wed, Feb 03, 2010 at 02:32:47PM -0500, Tom Lane wrote:
> Joshua Tolley <eggyknap(at)gmail(dot)com> writes:
> > I'd really like to see the data from pg_config and pg_controldata available
> > through SQL, such as by adding output to pg_show_all_settings(), or adding new
> > SRFs named something like pg_config() and pg_controldata(). Does this make as
> > much sense to the rest of the world as it does to me? In particular it's
> > useful to be able to find $libdir without requiring pg_config, as some
> > packagers tend not to include it in anything put the -dev packages, but all
> > those settings seem useful to have on hand, and in at least most cases
> > shouldn't be tough to expose via SQL. Comments?
>
> I wonder whether there's a security issue there. Telling an attacker
> whether you've been built with feature X seems like possibly useful
> info that he couldn't otherwise get without local machine access.
> In particular, we already try to avoid exposing server filesystem
> path information.
I'd wondered the same thing, without spending enough time on it to come to a
conclusion beyond "perhaps making the functions executable only by superuser
would suffice".
--
Joshua Tolley / eggyknap
End Point Corporation
http://www.endpoint.com