| From: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> | 
|---|---|
| To: | noah(at)leadboat(dot)com | 
| Cc: | david(at)pgmasters(dot)net, pgsql-hackers(at)postgresql(dot)org, don(at)seiler(dot)us | 
| Subject: | Re: Race between KeepFileRestoredFromArchive() and restartpoint | 
| Date: | 2022-08-04 08:06:40 | 
| Message-ID: | 20220804.170640.1425291966829818860.horikyota.ntt@gmail.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
At Wed, 3 Aug 2022 23:24:56 -0700, Noah Misch <noah(at)leadboat(dot)com> wrote in 
> > > I think in this case a HINT might be sufficient to at least keep people from
> > > wasting time tracking down a problem that has already been fixed.
> 
> Here's a patch to add that HINT.  I figure it's better to do this before next
> week's minor releases.  In the absence of objections, I'll push this around
> 2022-08-05 14:00 UTC.
+1
> > > However, there is another issue [1] that might argue for a back patch if
> > > this patch (as I believe) would fix the issue.
> > 
> > > [1] https://www.postgresql.org/message-id/CAHJZqBDxWfcd53jm0bFttuqpK3jV2YKWx%3D4W7KxNB4zzt%2B%2BqFg%40mail.gmail.com
> > 
> > That makes sense.  Each iteration of the restartpoint recycle loop has a 1/N
> > chance of failing.  Recovery adds >N files between restartpoints.  Hence, the
> > WAL directory grows without bound.  Is that roughly the theory in mind?
> 
> On further reflection, I don't expect it to happen that way.  Each failure
> message is LOG-level, so the remaining recycles still happen.  (The race
> condition can yield an ERROR under PreallocXlogFiles(), but recycling is
> already done at that point.)
I agree to this.
regards.
-- 
Kyotaro Horiguchi
NTT Open Source Software Center
| From | Date | Subject | |
|---|---|---|---|
| Next Message | John Naylor | 2022-08-04 08:08:59 | Re: fix typos | 
| Previous Message | Ashutosh Sharma | 2022-08-04 08:03:16 | Re: Correct comment in RemoveNonParentXlogFiles() |