Replace XLogRecPtr struct with a 64-bit integer.

Heikki Linnakangas <heikki.linnakangas@iki.fi>

Commit: 0ab9d1c4b31622e9176472b4276f3e9831e3d6ba
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: 2012-06-24T16:19:45Z
Releases: 9.3.0
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.

Files

PathChange+/−
contrib/pageinspect/rawpage.c modified +2 −1
src/backend/access/gist/gist.c modified +2 −2
src/backend/access/gist/gistutil.c modified +2 −8
src/backend/access/transam/transam.c modified +0 −3
src/backend/access/transam/twophase.c modified +1 −2
src/backend/access/transam/xact.c modified +5 −5
src/backend/access/transam/xlog.c modified +115 −138
src/backend/access/transam/xlogfuncs.c modified +28 −27
src/backend/postmaster/checkpointer.c modified +2 −5
src/backend/replication/basebackup.c modified +1 −1
src/backend/replication/libpqwalreceiver/libpqwalreceiver.c modified +1 −1
src/backend/replication/repl_scanner.l modified +4 −1
src/backend/replication/syncrep.c modified +5 −11
src/backend/replication/walreceiver.c modified +6 −6
src/backend/replication/walreceiverfuncs.c modified +3 −4
src/backend/replication/walsender.c modified +16 −26
src/backend/storage/ipc/standby.c modified +2 −2
src/backend/storage/lmgr/proc.c modified +1 −2
src/bin/pg_basebackup/pg_basebackup.c modified +10 −6
src/bin/pg_basebackup/pg_receivexlog.c modified +11 −4
src/bin/pg_basebackup/receivelog.c modified +4 −5
src/bin/pg_controldata/pg_controldata.c modified +12 −12
src/bin/pg_resetxlog/pg_resetxlog.c modified +8 −18
src/include/access/transam.h modified +0 −4
src/include/access/xlogdefs.h modified +12 −37
src/include/access/xlog_internal.h modified +14 −23
src/include/catalog/pg_control.h modified +1 −1
src/include/storage/bufpage.h modified +12 −3