Re: Too strict check when starting from a basebackup taken off a standby - Mailing list pgsql-hackers

From Marco Nenciarini
Subject Re: Too strict check when starting from a basebackup taken off a standby
Date
Msg-id 5489A84F.6070008@2ndquadrant.it
Whole thread Raw
In response to Re: Too strict check when starting from a basebackup taken off a standby  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: Too strict check when starting from a basebackup taken off a standby  (Heikki Linnakangas <hlinnakangas@vmware.com>)
List pgsql-hackers
Il 11/12/14 12:38, Andres Freund ha scritto:
> On December 11, 2014 9:56:09 AM CET, Heikki Linnakangas <hlinnakangas@vmware.com> wrote:
>> On 12/11/2014 05:45 AM, Andres Freund wrote:
>>
>> Yeah. I was not able to reproduce this, but I'm clearly missing
>> something, since both you and Sergey have seen this happening. Can you
>> write a script to reproduce?
>
> Not right now, I only have my mobile... Its quite easy though. Create a pg-basebackup from a standby. Create a
recovery.confwith a broken primary conninfo. Start. Shutdown. Fix conninfo. Start. 
>

Just tested it. There steps are not sufficient to reproduce the issue on
a test installation. I suppose because, on small test datadir, the
checkpoint location and the redo location on the pg_control are the same
present in the backup_label.

To trigger this bug you need to have at least a restartpoint happened on
standby between the start and the end of the backup.

you could simulate it issuing a checkpoint on master, a checkpoint on
standby (to force a restartpoint), then copying the pg_control from the
standby.

This way I've been able to reproduce it.

Regards,
Marco

--
Marco Nenciarini - 2ndQuadrant Italy
PostgreSQL Training, Services and Support
marco.nenciarini@2ndQuadrant.it | www.2ndQuadrant.it


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Review of Refactoring code for sync node detection
Next
From: Peter Eisentraut
Date:
Subject: Re: [REVIEW] Re: Fix xpath() to return namespace definitions