Re: pg_stat_activity crashes - Mailing list pgsql-hackers

From Kyotaro HORIGUCHI
Subject Re: pg_stat_activity crashes
Date
Msg-id 20160426.090806.06477211.horiguchi.kyotaro@lab.ntt.co.jp
Whole thread Raw
In response to Re: pg_stat_activity crashes  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Hello, thank you for understanding.

At Mon, 25 Apr 2016 10:26:49 -0400, Robert Haas <robertmhaas@gmail.com> wrote in
<CA+TgmoZDcaGCF0n9PaF5kzwj0CNRa-E+tDgzW80GVxg77gPdSA@mail.gmail.com>
> On Thu, Apr 21, 2016 at 9:47 PM, Kyotaro HORIGUCHI
> <horiguchi.kyotaro@lab.ntt.co.jp> wrote:
> > A lock was already held in BackendPidGetProc(). Is it also
> > needless? If so, we should use BackendPidGetProcWithLock() instad
> > (the name seems a bit confusing, though).
> 
> Oh, that's really sad.  No, that lock is definitely needed.  We should
> probably try to figure out some day if there is a way to make this
> completely lockless, but that'll have to be 9.7 material or later.
> :-(

Agreed.

> > What I did in the patch was just extending the lock duration
> > until reading the pointer proc. I didn't added any additional
> > lock.
> 
> Sorry, I didn't realize that.  Good point.

I'm happy that you understand me:)

> >> >  The
> >> > only thing we need to do is to prevent the value from being read
> >> > twice, and we already have precedent for how to prevent that in
> >> > freelist.c.
> >
> > However, I don't have objections for the patch applied.
> 
> OK, let's leave it like that for now, then.

regards,

-- 
Kyotaro Horiguchi
NTT Open Source Software Center





pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Suspicious behaviour on applying XLOG_HEAP2_VISIBLE.
Next
From: Andres Freund
Date:
Subject: Verifying embedded oids in *recv is a bad idea