aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/nbtree/nbtinsert.c
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/nbtree/nbtinsert.c
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/nbtree/nbtinsert.c')
-rw-r--r--src/backend/access/nbtree/nbtinsert.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/backend/access/nbtree/nbtinsert.c b/src/backend/access/nbtree/nbtinsert.c
index 6ed51fea156..63e099b0fd9 100644
--- a/src/backend/access/nbtree/nbtinsert.c
+++ b/src/backend/access/nbtree/nbtinsert.c
@@ -858,11 +858,9 @@ _bt_insertonpg(Relation rel,
if (BufferIsValid(metabuf))
{
PageSetLSN(metapg, recptr);
- PageSetTLI(metapg, ThisTimeLineID);
}
PageSetLSN(page, recptr);
- PageSetTLI(page, ThisTimeLineID);
}
END_CRIT_SECTION();
@@ -946,7 +944,6 @@ _bt_split(Relation rel, Buffer buf, OffsetNumber firstright,
* examine these fields and possibly dump them in a page image.
*/
PageSetLSN(leftpage, PageGetLSN(origpage));
- PageSetTLI(leftpage, PageGetTLI(origpage));
/* init btree private data */
oopaque = (BTPageOpaque) PageGetSpecialPointer(origpage);
@@ -1319,13 +1316,10 @@ _bt_split(Relation rel, Buffer buf, OffsetNumber firstright,
recptr = XLogInsert(RM_BTREE_ID, xlinfo, rdata);
PageSetLSN(origpage, recptr);
- PageSetTLI(origpage, ThisTimeLineID);
PageSetLSN(rightpage, recptr);
- PageSetTLI(rightpage, ThisTimeLineID);
if (!P_RIGHTMOST(ropaque))
{
PageSetLSN(spage, recptr);
- PageSetTLI(spage, ThisTimeLineID);
}
}
@@ -1961,9 +1955,7 @@ _bt_newroot(Relation rel, Buffer lbuf, Buffer rbuf)
recptr = XLogInsert(RM_BTREE_ID, XLOG_BTREE_NEWROOT, rdata);
PageSetLSN(rootpage, recptr);
- PageSetTLI(rootpage, ThisTimeLineID);
PageSetLSN(metapg, recptr);
- PageSetTLI(metapg, ThisTimeLineID);
}
END_CRIT_SECTION();