Re: pg_rewind in contrib

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: hlinnaka(at)iki(dot)fi
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Satoshi Nagayasu <snaga(at)uptime(dot)jp>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Michael Paquier <mpaquier(at)vmware(dot)com>
Subject: Re: pg_rewind in contrib
Date: 2015-03-12 06:49:41
Message-ID: CAA4eK1KmS3p3c7Xp7ObW+ehDnrrUMgHB9cE=QHejK4RR1gAmsA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 11, 2015 at 2:23 PM, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:

> On 03/11/2015 05:01 AM, Amit Kapila wrote:
>>
>> I have tried without backslash as well, but still it returns
>> same error.
>>
>> pg_rewind.exe -D ..\..\Data --source-pgdata=..\..\Database1
>> The servers diverged at WAL position 0/1769BD8 on timeline 5.
>> Rewinding from last common checkpoint at 0/1769B30 on timeline 5
>>
>> could not open file "..\..\Data/base/12706/16394" for truncation: No such
>> file or directory
>> Failure, exiting
>>
>
> I tried to reproduce this, but it tripped the "Assert(entry->isrelfile)"
> assertion in process_block_change. However, that seems to be an unrelated
> issue - pg_rewind was not handling FSM blocks correctly. It's supposed to
> ignore them but extactPageInfo didn't get the memo. I think I broke that
> when doing the changes for the new WAL record format.
>
> After fixing that (new patch attached), your test case works fine for me.
> I'm using the attached bash script to test it. Can you test if the attached
> script works for you, and if it does, see if you can "fix" the script so
> that it reproduces the error you're seeing?
>
>
With attached modified script, I am able to reproduce the
error (I have used the latest pg_rewind patch (pg_rewind-bin-8))

The servers diverged at WAL position 0/1693400 on timeline 1.
Rewinding from last common checkpoint at 0/1693390 on timeline 1

could not open file "data-master/base/12706/16384" for truncation: No such
file or directory
Failure, exiting

I am able to reproduce it on Windows (haven't tried it on linux).

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Attachment Content-Type Size
amits-test-modify.sh application/x-sh 2.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2015-03-12 06:54:49 Re: proposal: searching in array function - array_position
Previous Message Tom Lane 2015-03-12 04:35:07 Re: EvalPlanQual behaves oddly for FDW queries involving system columns