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:


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

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to