]> granicus.if.org Git - postgresql/commit
Move WAL continuation record information to WAL page header.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Sun, 24 Jun 2012 15:15:00 +0000 (18:15 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Sun, 24 Jun 2012 15:35:30 +0000 (18:35 +0300)
commit20ba5ca64c7c858400f845f8ded330604e2c8d61
tree918acf9fecc812385344a956d2cbd9e94226c8d1
parentdfda6ebaec6763090fb78b458a979b558c50b39b
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.
src/backend/access/transam/xlog.c
src/include/access/xlog_internal.h