Skip to content

Commit ebd551f

Browse files
committed
Update some incorrect comments about xlog records.
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
1 parent b6a0d46 commit ebd551f

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

src/include/access/gistxlog.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,7 @@ typedef struct gistxlogDelete
5252
TransactionId snapshotConflictHorizon;
5353
uint16 ntodelete; /* number of deleted offsets */
5454

55-
/*
56-
* In payload of blk 0 : todelete OffsetNumbers
57-
*/
55+
/* TODELETE OFFSET NUMBER ARRAY FOLLOWS */
5856
} gistxlogDelete;
5957

6058
#define SizeOfGistxlogDelete (offsetof(gistxlogDelete, ntodelete) + sizeof(uint16))

src/include/access/heapam_xlog.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,9 @@ typedef struct xl_heap_freeze_page
345345
TransactionId snapshotConflictHorizon;
346346
uint16 nplans;
347347

348-
/* FREEZE PLANS FOLLOW */
349-
/* OFFSET NUMBER ARRAY FOLLOWS */
348+
/*
349+
* In payload of blk 0 : FREEZE PLANS and OFFSET NUMBER ARRAY
350+
*/
350351
} xl_heap_freeze_page;
351352

352353
#define SizeOfHeapFreezePage (offsetof(xl_heap_freeze_page, nplans) + sizeof(uint16))

src/include/access/nbtxlog.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,13 @@ typedef struct xl_btree_delete
236236
uint16 ndeleted;
237237
uint16 nupdated;
238238

239-
/* DELETED TARGET OFFSET NUMBERS FOLLOW */
240-
/* UPDATED TARGET OFFSET NUMBERS FOLLOW */
241-
/* UPDATED TUPLES METADATA (xl_btree_update) ARRAY FOLLOWS */
239+
/*----
240+
* In payload of blk 0 :
241+
* - DELETED TARGET OFFSET NUMBERS
242+
* - UPDATED TARGET OFFSET NUMBERS
243+
* - UPDATED TUPLES METADATA (xl_btree_update) ARRAY
244+
*----
245+
*/
242246
} xl_btree_delete;
243247

244248
#define SizeOfBtreeDelete (offsetof(xl_btree_delete, nupdated) + sizeof(uint16))

0 commit comments

Comments
 (0)