Re: archive recovery fetching wrong segments

From: Grigory Smolkin <g(dot)smolkin(at)postgrespro(dot)ru>
To: David Steele <david(at)pgmasters(dot)net>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: archive recovery fetching wrong segments
Date: 2020-04-06 20:46:01
Message-ID: b636f09c-3bf1-e90b-fb79-9baaf296bb39@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 4/6/20 10:51 PM, David Steele wrote:
> On 4/6/20 3:23 PM, Grigory Smolkin wrote:
>>
>> On 4/6/20 9:17 PM, David Steele wrote:
>>> Hi Grigory,
>>
>> Hello!
>>>
>>> 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?
>>
>> Well I`ve been testing it all day and so far nothing is broken.
>
> Perhaps I wasn't clear. There is a patch in this thread:
>
> https://www.postgresql.org/message-id/flat/792ea085-95c4-bca0-ae82-47fdc80e146d%40oss.nttdata.com#800f005e01af6cb3bfcd70c53007a2db
>
>
> which seems to address the same issue and is ready to be committed.
>
> I'd suggest you have a look at that patch and see if it fixes your issue.

Ops, I`ve missed it.
Thank you, I will look into it.

>
> Regards,

--
Grigory Smolkin
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2020-04-06 20:48:35 Re: [PATCH] Incremental sort (was: PoC: Partial sort)
Previous Message Tom Lane 2020-04-06 20:45:44 Re: Online verification of checksums