Skip site navigation (1) Skip section navigation (2)

pgsql: Move WAL continuation record information to WAL page header.

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Move WAL continuation record information to WAL page header.
Date: 2012-06-24 16:22:30
Message-ID: E1Sipa2-0008Px-8M@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-hackers
Move WAL continuation record information to WAL page header.

The continuation record only contained one field, xl_rem_len, so it makes
things simpler to just include it in the WAL page header. This wastes four
bytes on pages that don't begin with a continuation from previos page, plus
four bytes on every page, because of padding.

The motivation of this is to make it easier to calculate how much space a
WAL record needs. Before this patch, it depended on how many page boundaries
the record crosses. The motivation of that, in turn, is to separate the
allocation of space in the WAL from the copying of the record data to the
allocated space. Keeping the calculation of space required simple helps to
keep the critical section of allocating the space from WAL short. But that's
not included in this patch yet.

Bump WAL version number again, as this is an incompatible change.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/20ba5ca64c7c858400f845f8ded330604e2c8d61

Modified Files
--------------
src/backend/access/transam/xlog.c  |   31 ++++++++++++++-----------------
src/include/access/xlog_internal.h |   35 ++++++++++++++---------------------
2 files changed, 28 insertions(+), 38 deletions(-)

Responses

pgsql-hackers by date

Next:From: Heikki LinnakangasDate: 2012-06-24 16:24:31
Subject: Re: WAL format changes
Previous:From: Tom LaneDate: 2012-06-24 16:14:08
Subject: Re: random failing builds on spoonbill - backends not exiting...

pgsql-committers by date

Next:From: Heikki LinnakangasDate: 2012-06-24 17:02:27
Subject: pgsql: Use LL suffix for 64-bit constants.
Previous:From: Robert HaasDate: 2012-06-22 13:06:39
Subject: pgsql: Make pgbench -i emit only one-tenth as many status messages.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group