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

pgsql: Move BKP_REMOVABLE bit from individual WAL records to WAL pageh

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Move BKP_REMOVABLE bit from individual WAL records to WAL pageh
Date: 2011-12-12 21:22:52
Message-ID: E1RaDKm-0007Rc-JL@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Move BKP_REMOVABLE bit from individual WAL records to WAL page headers.

Removing this bit from xl_info allows us to restore the old limit of four
(not three) separate pages touched by a WAL record, which is needed for the
upcoming SP-GiST feature, and will likely be useful elsewhere in future.

When we implemented XLR_BKP_REMOVABLE in 2007, we had to do it like that
because no special WAL-visible action was taken when starting a backup.
However, now we force a segment switch when starting a backup, so a
compressing WAL archiver (such as pglesslog) that uses the state shown in
the current page header will not be fooled as to removability of backup
blocks.  The only downside is that the archiver will not return to
compressing mode for up to one WAL page after the backup is over, which is
a small price to pay for getting back the extra xl_info bit.  In any case
the archiver could look for XLOG_BACKUP_END records if it thought it was
worth the trouble to do so.

Bump XLOG_PAGE_MAGIC since this is effectively a change in WAL format.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/2dd9322ba6eea76800b38bfea0599fbc459458f2

Modified Files
--------------
src/backend/access/transam/README  |    2 +-
src/backend/access/transam/xlog.c  |   60 ++++++++++++++++++++---------------
src/include/access/xlog.h          |   18 +++--------
src/include/access/xlog_internal.h |    6 ++-
4 files changed, 44 insertions(+), 42 deletions(-)

pgsql-committers by date

Next:From: Heikki LinnakangasDate: 2011-12-13 06:35:07
Subject: Re: pgsql: Revert the behavior of inet/cidr functions to not unpack the arg
Previous:From: Rafael MartinezDate: 2011-12-12 19:53:09
Subject: Re: pgsql: Revert the behavior of inet/cidr functions to not unpack the arg

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