Re: Bug in visibility map WAL-logging - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Bug in visibility map WAL-logging
Date
Msg-id 52CD4B93.2090903@vmware.com
Whole thread Raw
In response to Re: Bug in visibility map WAL-logging  (Greg Stark <stark@mit.edu>)
List pgsql-hackers
On 01/08/2014 07:29 AM, Greg Stark wrote:
> On Tue, Jan 7, 2014 at 11:36 AM, Heikki Linnakangas
> <hlinnakangas@vmware.com> wrote:
>> Hmm. The xlogdump indeed shows that the order of 'clean' and 'visible' is
>> incorrect, but I don't immediately see how that could cause the PANIC. Why
>> is the page uninitialized in the standby? If VACUUM is removing some dead
>> tuples from it, it certainly should exist and be correctly initialized.
>
> Unless the vacuum subsequently truncated the file to be shorter and
> the backup was taken after that?

In that case WAL replay should also see the truncation record before 
reaching consistency. We only PANIC on an uninitialized/missing page 
after reaching consistency, before that it's indeed normal if the file 
was later truncated or deleted.

- Heikki



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Bug in visibility map WAL-logging
Next
From: Heikki Linnakangas
Date:
Subject: Specifying both recovery_target_xid and recovery_target_time