Re: Problem while setting the fpw with SIGHUP

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, Robert Haas <robertmhaas(at)gmail(dot)com>, hlinnaka <hlinnaka(at)iki(dot)fi>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Problem while setting the fpw with SIGHUP
Date: 2018-09-27 08:00:13
Message-ID: CAA4eK1JTVnENwm6A_hTfsfjPvDEMo0gh9ot1+W1Y9ZyfcFxGXg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Sep 27, 2018 at 11:18 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Thu, Sep 27, 2018 at 10:34 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> >
> > On Thu, Sep 27, 2018 at 10:03:59AM +0530, Amit Kapila wrote:
> > > I think, in this case, it might be advisable to just fix the problem
> > > (a) which is what has been reported originally in the thread and
> > > AFAICS, the fix for that is clear as compared to the problem (b). If
> > > you agree, then we can discuss what is the best fix for the first
> > > problem (a).
> >
> > Okay, thanks for the input. The fix for (a) would be in my opinion to
> > just move the call to RecoveryInProgress() out of the critical section,
> > then save the result into a variable, and use the variable within the
> > critical section to avoid the potential palloc() problems. What do you
> > think?
> >
>
> Your proposed solution makes sense to me. IIUC, this is quite similar
> to what Dilip has also proposed [1].
>

I can take care of committing something along the lines of Dilip's
patch if you are okay.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2018-09-27 08:02:21 Re: Problem while setting the fpw with SIGHUP
Previous Message Michael Paquier 2018-09-27 07:51:52 Re: Add SKIP LOCKED to VACUUM and ANALYZE