pgsql: Change how first WAL segment on new timeline after promotion is - Mailing list pgsql-committers

From Heikki Linnakangas
Subject pgsql: Change how first WAL segment on new timeline after promotion is
Date
Msg-id E1Y1flH-000118-KB@gemulon.postgresql.org
Whole thread Raw
Responses Re: pgsql: Change how first WAL segment on new timeline after promotion is  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-committers
Change how first WAL segment on new timeline after promotion is created.

Two changes:

1. When copying a WAL segment from old timeline to create the first segment
on the new timeline, only copy up to the point where the timeline switch
happens, and zero-fill the rest. This avoids corner cases where we might
think that the copied WAL from the previous timeline belong to the new
timeline.

2. If the timeline switch happens at a segment boundary, don't copy the
whole old segment to the new timeline. It's pointless, because it's 100%
identical to the old segment.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/ba94518aad23beb800b657bd0cc8c4e7ea43ca33

Modified Files
--------------
src/backend/access/transam/xlog.c |   82 +++++++++++++++++++++++++++----------
1 file changed, 61 insertions(+), 21 deletions(-)


pgsql-committers by date:

Previous
From: Fujii Masao
Date:
Subject: pgsql: Add memory barriers for PgBackendStatus.st_changecount protocol.
Next
From: Tom Lane
Date:
Subject: pgsql: Improve hash_create's API for selecting simple-binary-key hash f