pgsql: Replace XLogRecPtr struct with a 64-bit integer.

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Replace XLogRecPtr struct with a 64-bit integer.
Date: 2012-06-24 16:22:30
Message-ID: E1Sipa2-0008Q0-8K@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Replace XLogRecPtr struct with a 64-bit integer.

This simplifies code that needs to do arithmetic on XLogRecPtrs.

To avoid changing on-disk format of data pages, the LSN on data pages is
still stored in the old format. That should keep pg_upgrade happy. However,
we have XLogRecPtrs embedded in the control file, and in the structs that
are sent over the replication protocol, so this changes breaks compatibility
of pg_basebackup and server. I didn't do anything about this in this patch,
per discussion on -hackers, the right thing to do would to be to change the
replication protocol to be architecture-independent, so that you could use
a newer version of pg_receivexlog, for example, against an older server
version.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/0ab9d1c4b31622e9176472b4276f3e9831e3d6ba

Modified Files
--------------
contrib/pageinspect/rawpage.c | 3 +-
src/backend/access/gist/gist.c | 4 +-
src/backend/access/gist/gistutil.c | 10 +-
src/backend/access/transam/transam.c | 3 -
src/backend/access/transam/twophase.c | 3 +-
src/backend/access/transam/xact.c | 10 +-
src/backend/access/transam/xlog.c | 253 +++++++++-----------
src/backend/access/transam/xlogfuncs.c | 55 +++--
src/backend/postmaster/checkpointer.c | 7 +-
src/backend/replication/basebackup.c | 2 +-
.../libpqwalreceiver/libpqwalreceiver.c | 2 +-
src/backend/replication/repl_scanner.l | 5 +-
src/backend/replication/syncrep.c | 16 +-
src/backend/replication/walreceiver.c | 12 +-
src/backend/replication/walreceiverfuncs.c | 7 +-
src/backend/replication/walsender.c | 42 ++--
src/backend/storage/ipc/standby.c | 4 +-
src/backend/storage/lmgr/proc.c | 3 +-
src/bin/pg_basebackup/pg_basebackup.c | 16 +-
src/bin/pg_basebackup/pg_receivexlog.c | 15 +-
src/bin/pg_basebackup/receivelog.c | 9 +-
src/bin/pg_controldata/pg_controldata.c | 24 +-
src/bin/pg_resetxlog/pg_resetxlog.c | 26 +--
src/include/access/transam.h | 4 -
src/include/access/xlog_internal.h | 37 +--
src/include/access/xlogdefs.h | 49 +---
src/include/catalog/pg_control.h | 2 +-
src/include/storage/bufpage.h | 15 +-
28 files changed, 280 insertions(+), 358 deletions(-)

Responses

Browse pgsql-committers by date

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

Browse pgsql-hackers by date

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