Re: pg_primary_conninfo
От | Magnus Hagander |
---|---|
Тема | Re: pg_primary_conninfo |
Дата | |
Msg-id | AANLkTimXXko1OJDTrT8LU=5GxtUcL7C0mNgqaOC-DnX1@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: pg_primary_conninfo (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: pg_primary_conninfo
|
Список | pgsql-hackers |
<p><br /> On Dec 28, 2010 3:58 PM, "Tom Lane" <<a href="mailto:tgl@sss.pgh.pa.us">tgl@sss.pgh.pa.us</a>> wrote:<br/> ><br /> > Magnus Hagander <<a href="mailto:magnus@hagander.net">magnus@hagander.net</a>> writes:<br/> > > Attached patch implements a function called pg_primary_conninfo() that<br /> > > returns, well,the primary_conninfo used on the standby when in<br /> > > streaming replication mode (otherwise NULL).<br />><br /> > > Objections?<br /> ><br /> > What's the use case? And aren't there security reasons to NOT expose<br/> > that? It might contain a password for instance.<p>Good point - should be made superuser only. <br /> ><p>>> + if (recptr.xlogid == 0 && recptr.xrecoff == 0 && conninfo[0] != '\0')<br /> > >+ PG_RETURN_NULL();<br /> ><br /> > This test seems a bit incoherent.<p>I used that to test that streamingrepl is enabled at all. Is there a better way? <p>/Magnus <br />
В списке pgsql-hackers по дате отправления: