Re: pg_primary_conninfo

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_primary_conninfo
Date: 2010-12-29 08:36:03
Message-ID: AANLkTi=EjWUfoNQtb+vWL5EyrgfJRPyGKo8ZYMC__Z6M@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Dec 28, 2010 at 18:12, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Dec 28, 2010, at 10:34 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> I'm still wondering what's the actual use-case for exposing this inside
>> SQL.  Those with a legitimate need-to-know can look at the slave
>> server's config files, no?
>
> SQL access is frequently more convenient, though.

Yes. Reading it in the files does not scale with $LOTS of servers, be
them slaves or masters or both. You can't assume that people have
direct filesystem access to the server (or at least it's data
directory) - particularly when the organisation is large enough that
you have different teams running the db's and the OS's, not to mention
when you have some on-call group who verifies the things in the middle
of the night...

Unless you mean reading them with pg_read_file() and then parsing it
manually, but that just requires everybody to re-invent the wheel we
already have in the parser.

> Although maybe now that we've made recovery.conf use the GUC lexer we oughta continue in that vein and expose those parameters as PGC_INTERNAL GUCs rather than inventing a new function for it...

That's definitely another option that I wouldn't object to if people
prefer that way.

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2010-12-29 08:51:42 Re: pg_primary_conninfo
Previous Message Magnus Hagander 2010-12-29 08:33:24 Re: pg_primary_conninfo