Re: primary_conninfo missing from pg_stat_wal_receiver

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Tatsuo Ishii <ishii(at)postgresql(dot)org>, Vik Fearing <vik(at)2ndquadrant(dot)fr>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: primary_conninfo missing from pg_stat_wal_receiver
Date: 2016-06-29 21:40:15
Message-ID: CABUevEwWSuRkoR3=GdC_QeB+rjYVwnb1dB+iZn2SgSiGjvvz9Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jun 29, 2016 at 11:18 PM, Michael Paquier <michael(dot)paquier(at)gmail(dot)com
> wrote:

> On Thu, Jun 30, 2016 at 6:01 AM, Alvaro Herrera
> <alvherre(at)2ndquadrant(dot)com> wrote:
> > Alvaro Herrera wrote:
> >
> >> I propose to push this patch, closing the open item, and you can rework
> >> on top -- I suppose you would completely remove the original conninfo
> >> from shared memory and instead only copy the obfuscated version there
> >> (and probably also remove the ready_to_display flag). I think we'd need
> >> to see the patch before deciding whether we want it in 9.6 or not,
> >> keeping in mind that having the conninfo in shared memory is a
> >> pre-existing problem, unrelated to the pgstats view new in 9.6.
> >
> > Pushed this. Feel free to tinker further with it, if you feel the need
> > to.
> >
> > Regarding backpatching the clearing of shared memory, I'm inclined not
> > to. If there is a real security concern there (I'm unsure what attack
> > are we protecting against), it may be better fixed by the approach
> > suggested by Fujii whereby the sensitive info is not ever published in
> > shared memory.
>
> Yes, this is not going to be pretty invasive anyway. The cleanest way
> to handle things here would be to refactor a bit xlog.c
> (xlogparams.c?) so as readRecoveryCommandFile is exposed in its own
> file, and the recovery parameters are handled in a single structure,
> which is the return result of the call. To reduce a bit the cruft in
> xlog.c that would be nice anyway I guess.
>

There was also that (old) thread about making the recovery.conf parameters
be general GUCs. I don't actually remember the consensus there, but diong
that would certainly change how it's handled as well.

--
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 Tom Lane 2016-06-29 21:47:30 Re: primary_conninfo missing from pg_stat_wal_receiver
Previous Message Michael Paquier 2016-06-29 21:18:49 Re: primary_conninfo missing from pg_stat_wal_receiver