From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> |
Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, 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-10 06:24:50 |
Message-ID: | CAA4eK1KW8qHoQy6nYVqbX9N_kr8YxgD8cPP2ikM3ScCSduArXg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Aug 28, 2018 at 4:05 PM Kyotaro HORIGUCHI
<horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> wrote:
>
> Hello.
>
> At Sat, 25 Aug 2018 14:50:53 +0530, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote in <CAA4eK1K7dVgKU4zrNTSCW=EoqALG38XmNT0HK9Wdkr935iwTQg(at)mail(dot)gmail(dot)com>
> > On Wed, Aug 1, 2018 at 12:56 PM Kyotaro HORIGUCHI
> > <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> > >
> > > Thank you, Amit, Michael.
> > >
> >
> > Can you verify the first patch that I have posted above [1]? We can
> > commit it separately.
>
> Thanks for prompting. The difference is in a comment and I'm fine
> with the change.
>
Thanks, but what I wanted you to verify is the commit that broke it in
9.5. On again looking at it, I think it is below code in commit
2076db2aea that caused this problem. If possible, can you once test
it before and at this commit or at least do the manual review of same
to cross-verify?
+ doPageWrites = (Insert->fullPageWrites || Insert->forcePageWrites);
- /*
- * Also check to see if fullPageWrites or forcePageWrites was
just turned
- * on; if we weren't already doing full-page writes then go back and
- * recompute. (If it was just turned off, we could recompute the record
- * without full pages, but we choose not to bother.)
- */
- if ((Insert->fullPageWrites || Insert->forcePageWrites) &&
!doPageWrites)
+ if (fpw_lsn != InvalidXLogRecPtr && fpw_lsn <= RedoRecPtr &&
doPageWrites)
{
- /* Oops, must redo it with full-page data. */
+ /*
+ * Oops, some buffer now needs to be backed up that the caller
+ * didn't back up. Start over.
+ */
WALInsertLockRelease();
END_CRIT_SECTION();
- rdt_lastnormal->next = NULL;
- info = info_orig;
- goto begin;
+ return InvalidXLogRecPtr;
}
--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2018-09-10 06:30:16 | Re: How to find local logical replication origin? |
Previous Message | Michael Paquier | 2018-09-10 06:22:29 | Re: Add extension options to control TAP and isolation tests |