Clear up btree_xlog_split() alignment comment.
authorPeter Geoghegan <pg@bowt.ie>
Fri, 3 Jan 2020 02:30:25 +0000 (18:30 -0800)
committerPeter Geoghegan <pg@bowt.ie>
Fri, 3 Jan 2020 02:30:25 +0000 (18:30 -0800)
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

index 5eca4ab2727879065e26cd612ac15b3f2209ccc4..e1c374914851335042d5bb755c42cdaaa24316f1 100644 (file)
@@ -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;