aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Geoghegan <pg@bowt.ie>2020-01-02 18:30:25 -0800
committerPeter Geoghegan <pg@bowt.ie>2020-01-02 18:30:25 -0800
commit0c41c83d8ff44ed8f9753885e2c11b3277babcce (patch)
tree4e97a5c29d4856c4997f0705120bebe836cc7864
parent90d7f6604b6ed2dcedee2884c3b01541600515cb (diff)
downloadpostgresql-0c41c83d8ff44ed8f9753885e2c11b3277babcce.tar.gz
postgresql-0c41c83d8ff44ed8f9753885e2c11b3277babcce.zip
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.
-rw-r--r--src/backend/access/nbtree/nbtxlog.c6
1 files changed, 5 insertions, 1 deletions
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;