git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 47c7365) | patch
Don't waste the last segment of each 4GB logical log file.
2012年6月24日 15:06:38 +0000 (18:06 +0300)
2012年6月24日 15:35:29 +0000 (18:35 +0300)
commit dfda6ebaec6763090fb78b458a979b558c50b39b
Don't waste the last segment of each 4GB logical log file.

The comments claimed that wasting the last segment made it easier to do
calculations with XLogRecPtrs, because you don't have problems representing
last-byte-position-plus-1 that way. In my experience, however, it only made
things more complicated, because the there was two ways to represent the
boundary at the beginning of a logical log file: logid = n+1 and xrecoff = 0,
or as xlogid = n and xrecoff = 4GB - XLOG_SEG_SIZE. Some functions were
picky about which representation was used.

Also, use a 64-bit segment number instead of the log/seg combination, to
point to a certain WAL segment. We assume that all platforms have a working
64-bit integer type nowadays.

This is an incompatible change in WAL format, so bumping WAL version number.
12 files changed:
src/backend/access/transam/xlog.c diff | blob | blame | history
src/backend/access/transam/xlogfuncs.c diff | blob | blame | history
src/backend/postmaster/checkpointer.c diff | blob | blame | history
src/backend/replication/basebackup.c diff | blob | blame | history
src/backend/replication/walreceiver.c diff | blob | blame | history
src/backend/replication/walsender.c diff | blob | blame | history
src/bin/pg_basebackup/pg_receivexlog.c diff | blob | blame | history
src/bin/pg_basebackup/receivelog.c diff | blob | blame | history
src/bin/pg_resetxlog/pg_resetxlog.c diff | blob | blame | history
src/include/access/xlog.h diff | blob | blame | history
src/include/access/xlog_internal.h diff | blob | blame | history
src/include/access/xlogdefs.h diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /