aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam
diff options
context:
space:
mode:
authorSimon Riggs <simon@2ndQuadrant.com>2013-03-18 13:46:42 +0000
committerSimon Riggs <simon@2ndQuadrant.com>2013-03-18 13:46:42 +0000
commitbb7cc2623f242ffafae404f8ebbb331b9a7f2b68 (patch)
treef51b5ac06db0cd66387ac8581c0c439db66a936b /src/backend/access/transam
parent4c855750fc0ba9bd30fa397eafbfee354908bbca (diff)
downloadpostgresql-bb7cc2623f242ffafae404f8ebbb331b9a7f2b68.tar.gz
postgresql-bb7cc2623f242ffafae404f8ebbb331b9a7f2b68.zip
Remove PageSetTLI and rename pd_tli to pd_checksum
Remove use of PageSetTLI() from all page manipulation functions and adjust README to indicate change in the way we make changes to pages. Repurpose those bytes into the pd_checksum field and explain how that works in comments about page header. Refactoring ahead of actual feature patch which would make use of the checksum field, arriving later. Jeff Davis, with comments and doc changes by Simon Riggs Direction suggested by Robert Haas; many others providing review comments.
Diffstat (limited to 'src/backend/access/transam')
-rw-r--r--src/backend/access/transam/README7
-rw-r--r--src/backend/access/transam/xlog.c1
2 files changed, 3 insertions, 5 deletions
diff --git a/src/backend/access/transam/README b/src/backend/access/transam/README
index aabcbba49e8..c77f9003441 100644
--- a/src/backend/access/transam/README
+++ b/src/backend/access/transam/README
@@ -439,13 +439,14 @@ critical section.)
happen before the WAL record is inserted; see notes in SyncOneBuffer().)
5. If the relation requires WAL-logging, build a WAL log record and pass it
-to XLogInsert(); then update the page's LSN and TLI using the returned XLOG
+to XLogInsert(); then update the page's LSN using the returned XLOG
location. For instance,
recptr = XLogInsert(rmgr_id, info, rdata);
PageSetLSN(dp, recptr);
- PageSetTLI(dp, ThisTimeLineID);
+ // Note that we no longer do PageSetTLI() from 9.3 onwards
+ // since that field on a page has now changed its meaning.
6. END_CRIT_SECTION()
@@ -489,7 +490,6 @@ standard replay-routine pattern for this case is
... initialize the page ...
PageSetLSN(page, lsn);
- PageSetTLI(page, ThisTimeLineID);
MarkBufferDirty(buffer);
UnlockReleaseBuffer(buffer);
@@ -523,7 +523,6 @@ The standard replay-routine pattern for this case is
... apply the change ...
PageSetLSN(page, lsn);
- PageSetTLI(page, ThisTimeLineID);
MarkBufferDirty(buffer);
UnlockReleaseBuffer(buffer);
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 8e7341ba45c..7f9edef435c 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -3188,7 +3188,6 @@ RestoreBackupBlock(XLogRecPtr lsn, XLogRecord *record, int block_index,
}
PageSetLSN(page, lsn);
- PageSetTLI(page, ThisTimeLineID);
MarkBufferDirty(buffer);
if (!keep_buffer)