Re: archive recovery fetching wrong segments - Mailing list pgsql-hackers

From David Steele
Subject Re: archive recovery fetching wrong segments
Date
Msg-id a58c0ab2-f520-2254-f96e-36e7b302b663@pgmasters.net
Whole thread Raw
In response to archive recovery fetching wrong segments  (Grigory Smolkin <g.smolkin@postgrespro.ru>)
Responses Re: archive recovery fetching wrong segments
List 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.

<snip>

> 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?

-- 
-David
david@pgmasters.net

[1] 

https://www.postgresql.org/message-id/flat/792ea085-95c4-bca0-ae82-47fdc80e146d%40oss.nttdata.com#800f005e01af6cb3bfcd70c53007a2db



pgsql-hackers by date:

Previous
From: David Steele
Date:
Subject: Re: Allow cluster owner to bypass authentication
Next
From: Stephen Frost
Date:
Subject: Re: where should I stick that backup?