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

From Heikki Linnakangas
Subject pgsql: Replace XLogRecPtr struct with a 64-bit integer.
Date
Msg-id E1Sipa2-0008Q0-8K@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: pgsql: Don't waste the last segment of each 4GB logical log file.
Next
From: Heikki Linnakangas
Date:
Subject: pgsql: Use LL suffix for 64-bit constants.