Update some incorrect comments about xlog records.
authorRobert Haas <[email protected]>
Fri, 3 Mar 2023 17:52:04 +0000 (12:52 -0500)
committerRobert Haas <[email protected]>
Fri, 3 Mar 2023 17:52:04 +0000 (12:52 -0500)
The comments claim that certain pieces of data are part of the main
WAL record data when in reality they are part of the data for
block 0. Repair.

Bertrand Drouvot, reviewed by Amit Kapila. Originally reported by me.

Discussion: http://postgr.es/m/80db7836-4415-d54a-64c3-66b88b1430e7@gmail.com

src/include/access/gistxlog.h
src/include/access/heapam_xlog.h
src/include/access/nbtxlog.h

index 09f9b0f8c67fb14815ae24e0ec0ac589e7c764a9..2ce9366277ded64bc7a339e313848e50c2c218c4 100644 (file)
@@ -52,9 +52,7 @@ typedef struct gistxlogDelete
        TransactionId snapshotConflictHorizon;
        uint16          ntodelete;              /* number of deleted offsets */
 
-       /*
-        * In payload of blk 0 : todelete OffsetNumbers
-        */
+       /* TODELETE OFFSET NUMBER ARRAY FOLLOWS */
 } gistxlogDelete;
 
 #define SizeOfGistxlogDelete   (offsetof(gistxlogDelete, ntodelete) + sizeof(uint16))
index 8cb0d8da193df32ccd293bf607f6fcaa1db0ec4e..a2c67d1cd3f30a30802877d1d6c3be5c6b49f757 100644 (file)
@@ -345,8 +345,9 @@ typedef struct xl_heap_freeze_page
        TransactionId snapshotConflictHorizon;
        uint16          nplans;
 
-       /* FREEZE PLANS FOLLOW */
-       /* OFFSET NUMBER ARRAY FOLLOWS */
+       /*
+        * In payload of blk 0 : FREEZE PLANS and OFFSET NUMBER ARRAY
+        */
 } xl_heap_freeze_page;
 
 #define SizeOfHeapFreezePage (offsetof(xl_heap_freeze_page, nplans) + sizeof(uint16))
index edd1333d9bb28f6222a093e2520a261948b7ae77..7dd67257f296193051ffd3dd62a3d0e84cd44acf 100644 (file)
@@ -236,9 +236,13 @@ typedef struct xl_btree_delete
        uint16          ndeleted;
        uint16          nupdated;
 
-       /* DELETED TARGET OFFSET NUMBERS FOLLOW */
-       /* UPDATED TARGET OFFSET NUMBERS FOLLOW */
-       /* UPDATED TUPLES METADATA (xl_btree_update) ARRAY FOLLOWS */
+       /*----
+        * In payload of blk 0 :
+        * - DELETED TARGET OFFSET NUMBERS
+        * - UPDATED TARGET OFFSET NUMBERS
+        * - UPDATED TUPLES METADATA (xl_btree_update) ARRAY
+        *----
+        */
 } xl_btree_delete;
 
 #define SizeOfBtreeDelete      (offsetof(xl_btree_delete, nupdated) + sizeof(uint16))