Re: archive recovery fetching wrong segments

From: David Steele <david(at)pgmasters(dot)net>
To: Grigory Smolkin <g(dot)smolkin(at)postgrespro(dot)ru>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: archive recovery fetching wrong segments
Date: 2020-04-06 18:17:52
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi Grigory,

On 4/5/20 8:02 PM, Grigory Smolkin wrote:
> Hello, hackers!
> I`m investigating a complains from our clients about archive recovery
> speed been very slow, and I`ve noticed a really strange and, I think, a
> very dangerous recovery behavior.
> When running multi-timeline archive recovery, for every requested segno
> startup process iterates through every timeline in restore target
> timeline history, starting from highest timeline and ending in current,
> and tries to fetch the segno in question from this timeline.


> Is there a reason behind this behavior?
> Also I`ve  attached a patch, which fixed this issue for me, but I`m not
> sure, that chosen approach is sound and didn`t break something.

This sure looks like [1] which has a completed patch nearly ready to
commit. Can you confirm and see if the proposed patch looks good?



In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2020-04-06 18:23:07 Re: where should I stick that backup?
Previous Message David Steele 2020-04-06 18:12:54 Re: Allow cluster owner to bypass authentication