postgres.git / summary / log / commit / refs
commit 0c41c83d8ff44ed8f9753885e2c11b3277babcce
Author: Peter Geoghegan <pg@bowt.ie>
Date: Fri Jan 03 02:30:25 2020 +0000
First released in: 13.0
Clear up btree_xlog_split() alignment comment.
Adjust a comment that describes how alignment of the new left page high
key works in btree_xlog_split(), the nbtree page split REDO routine.
The wording used before commit 2c03216d831 is much clearer, so go back
to that.
src/backend/access/nbtree/nbtxlog.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/backend/access/nbtree/nbtxlog.c b/src/backend/access/nbtree/nbtxlog.c
index 5eca4ab2727..e1c37491485 100644
--- a/src/backend/access/nbtree/nbtxlog.c
+++ b/src/backend/access/nbtree/nbtxlog.c
@@ -281,7 +281,11 @@ btree_xlog_split(bool onleft, XLogReaderState *record)
datalen -= newitemsz;
}
- /* Extract left hikey and its size (assuming 16-bit alignment) */
+ /*
+ * Extract left hikey and its size. We assume that 16-bit alignment
+ * is enough to apply IndexTupleSize (since it's fetching from a
+ * uint16 field).
+ */
left_hikey = (IndexTuple) datapos;
left_hikeysz = MAXALIGN(IndexTupleSize(left_hikey));
datapos += left_hikeysz;
[parent: 90d7f6604b6e]