Re: Failing start-up archive recovery at Standby mode in PG9.2.4 - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Failing start-up archive recovery at Standby mode in PG9.2.4
Date
Msg-id 517A2838.5090105@vmware.com
Whole thread Raw
In response to Re: Failing start-up archive recovery at Standby mode in PG9.2.4  (Kyotaro HORIGUCHI <kyota.horiguchi@gmail.com>)
List pgsql-hackers
On 26.04.2013 07:02, Kyotaro HORIGUCHI wrote:
> I am uncertain a bit weather it is  necessary to move curFileTLI to
> anywhere randomly read . On a short glance, the random access occurs also
> for reading checkpoint-related records.

I didn't understand that.

> Also I don't have clear distinction between lastSegmentTLI and curFileTLI
> after the patch applied.

In short, lastSegmentTLI is the TLI in first page of the last opened 
segment, while curFileTLI is the TLI in the filename of the last opened 
segment. Usually they're the same, but in a segment that contains a 
timeline switch, they differ. For example, if you perform PITR to a 
point in the middle of segment 000000010000000000000062, you end up with 
two segments:

000000010000000000000062
000000020000000000000062

The first half of those files are identical, but the latter contains a 
time-line changing checkpoint record in the middle, and from that point 
on the contents are different. When we open file 
000000020000000000000062, lastSegmentTLI is 1, because the first half of 
that segment contains WAL from timeline 1, but curFileTLI is 2, because 
that's the TLI in the filename.

- Heikki



pgsql-hackers by date:

Previous
From: Daniel Farina
Date:
Subject: Re: pg_controldata gobbledygook
Next
From: Dimitri Fontaine
Date:
Subject: Re: event trigger API documentation?