From: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
---|---|
To: | masao(dot)fujii(at)oss(dot)nttdata(dot)com |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Crash by targetted recovery |
Date: | 2020-03-09 04:49:27 |
Message-ID: | 20200309.134927.754909343807949809.horikyota.ntt@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
At Sat, 7 Mar 2020 01:46:16 +0900, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> wrote in
> > (It seems retroverting to the first patch when I started this...)
> > The second place covers wider cases so I reverted the first place.
>
> Thanks for updating the patch that way.
> Not sure which patch you're mentioning, though.
That meant 0003.
> Regarding 0003 patch, I added a bit more detail comments into
> the patch so that we can understand the code more easily.
> Updated version of 0003 patch attached. Barring any objection,
> at first, I plan to commit this patch.
Looks good to me. Thanks for writing the detailed comments.
> >> + lastSourceFailed = false; /* We haven't failed on the new source */
> >>
> >> Is this really necessary? Since ReadRecord() always reset
> >> lastSourceFailed to false, it seems not necessary.
> > It's just to make sure. Actually lastSourceFailed is always false
> > when we get there. But when the source is switched, lastSourceFailed
> > should be changed to false as a matter of design. I'd like to do that
> > unless that harms.
>
> OK.
Thanks.
> >> - else if (currentSource == 0)
> >> + else if (currentSource == 0 ||
> >>
> >> Though this is a *separate topic*, 0 should be XLOG_FROM_ANY?
> >> There are some places where 0 is used as the value of currentSource.
> >> IMO they should be updated so that XLOG_FROM_ANY is used instead of 0.
> > Yeah, I've thought that many times but have neglected since it is not
> > critical and trivial as a separate patch. I'd take the chance to do
> > that now. Another minor glitch is "int oldSource = currentSource;" it
> > is not debugger-friendly so I changed it to XLogSource. It is added
> > as a new patch file before the main patch.
>
> There seems to be more other places where XLogSource and
> XLOG_FROM_XXX are not used yet. For example, the initial values
> of readSource and XLogReceiptSource, the type of argument
> "source" in XLogFileReadAnyTLI() and XLogFileRead(), etc.
> These also should be updated?
Right. I checked through the file and AFAICS that's all. The attachec
v5-0001-Tidy...patch is the fix on top of the v4-0003 on the current
master.
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
Attachment | Content-Type | Size |
---|---|---|
v5-0001-Tidy-up-XLogSource-usage.patch | text/x-patch | 4.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Masahiko Sawada | 2020-03-09 05:10:57 | Re: Some problems of recovery conflict wait events |
Previous Message | Amit Kapila | 2020-03-09 04:26:43 | Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager |