diff options
author | Simon Riggs <simon@2ndQuadrant.com> | 2013-03-18 13:46:42 +0000 |
---|---|---|
committer | Simon Riggs <simon@2ndQuadrant.com> | 2013-03-18 13:46:42 +0000 |
commit | bb7cc2623f242ffafae404f8ebbb331b9a7f2b68 (patch) | |
tree | f51b5ac06db0cd66387ac8581c0c439db66a936b /src/backend/access/nbtree/nbtpage.c | |
parent | 4c855750fc0ba9bd30fa397eafbfee354908bbca (diff) | |
download | postgresql-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/nbtree/nbtpage.c')
-rw-r--r-- | src/backend/access/nbtree/nbtpage.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/backend/access/nbtree/nbtpage.c b/src/backend/access/nbtree/nbtpage.c index 9013f41727b..1d9cb7d1a06 100644 --- a/src/backend/access/nbtree/nbtpage.c +++ b/src/backend/access/nbtree/nbtpage.c @@ -241,9 +241,7 @@ _bt_getroot(Relation rel, int access) recptr = XLogInsert(RM_BTREE_ID, XLOG_BTREE_NEWROOT, &rdata); PageSetLSN(rootpage, recptr); - PageSetTLI(rootpage, ThisTimeLineID); PageSetLSN(metapg, recptr); - PageSetTLI(metapg, ThisTimeLineID); } END_CRIT_SECTION(); @@ -534,8 +532,8 @@ _bt_log_reuse_page(Relation rel, BlockNumber blkno, TransactionId latestRemovedX START_CRIT_SECTION(); /* - * We don't do MarkBufferDirty here because we're about initialise the - * page, and nobody else can see it yet. + * We don't do MarkBufferDirty here because we're about to initialise + * the page, and nobody else can see it yet. */ /* XLOG stuff */ @@ -554,8 +552,8 @@ _bt_log_reuse_page(Relation rel, BlockNumber blkno, TransactionId latestRemovedX XLogInsert(RM_BTREE_ID, XLOG_BTREE_REUSE_PAGE, rdata); /* - * We don't do PageSetLSN or PageSetTLI here because we're about - * initialise the page, so no need. + * We don't do PageSetLSN here because we're about to initialise + * the page, so no need. */ } @@ -863,7 +861,6 @@ _bt_delitems_vacuum(Relation rel, Buffer buf, recptr = XLogInsert(RM_BTREE_ID, XLOG_BTREE_VACUUM, rdata); PageSetLSN(page, recptr); - PageSetTLI(page, ThisTimeLineID); } END_CRIT_SECTION(); @@ -951,7 +948,6 @@ _bt_delitems_delete(Relation rel, Buffer buf, recptr = XLogInsert(RM_BTREE_ID, XLOG_BTREE_DELETE, rdata); PageSetLSN(page, recptr); - PageSetTLI(page, ThisTimeLineID); } END_CRIT_SECTION(); @@ -1533,22 +1529,17 @@ _bt_pagedel(Relation rel, Buffer buf, BTStack stack) if (BufferIsValid(metabuf)) { PageSetLSN(metapg, recptr); - PageSetTLI(metapg, ThisTimeLineID); } page = BufferGetPage(pbuf); PageSetLSN(page, recptr); - PageSetTLI(page, ThisTimeLineID); page = BufferGetPage(rbuf); PageSetLSN(page, recptr); - PageSetTLI(page, ThisTimeLineID); page = BufferGetPage(buf); PageSetLSN(page, recptr); - PageSetTLI(page, ThisTimeLineID); if (BufferIsValid(lbuf)) { page = BufferGetPage(lbuf); PageSetLSN(page, recptr); - PageSetTLI(page, ThisTimeLineID); } } |