mirror of
https://github.com/postgres/postgres.git
synced 2025-10-21 02:52:47 +03:00
Fix inconsistencies and typos in the tree
This is numbered take 7, and addresses a set of issues with code comments, variable names and unreferenced variables. Author: Alexander Lakhin Discussion: https://postgr.es/m/dff75442-2468-f74f-568c-6006e141062f@gmail.com
This commit is contained in:
@@ -171,9 +171,6 @@ typedef struct GinMetaPageData
|
||||
GinItemPointerGetBlockNumber(p) == (BlockNumber)0)
|
||||
#define ItemPointerSetMax(p) \
|
||||
ItemPointerSet((p), InvalidBlockNumber, (OffsetNumber)0xffff)
|
||||
#define ItemPointerIsMax(p) \
|
||||
(GinItemPointerGetOffsetNumber(p) == (OffsetNumber)0xffff && \
|
||||
GinItemPointerGetBlockNumber(p) == InvalidBlockNumber)
|
||||
#define ItemPointerSetLossyPage(p, b) \
|
||||
ItemPointerSet((p), (b), (OffsetNumber)0xffff)
|
||||
#define ItemPointerIsLossyPage(p) \
|
||||
|
@@ -127,7 +127,7 @@ typedef struct ginxlogSplit
|
||||
|
||||
/*
|
||||
* Vacuum simply WAL-logs the whole page, when anything is modified. This
|
||||
* is functionally identical to heap_newpage records, but is kept separate for
|
||||
* is functionally identical to XLOG_FPI records, but is kept separate for
|
||||
* debugging purposes. (When inspecting the WAL stream, it's easier to see
|
||||
* what's going on when GIN vacuum records are marked as such, not as heap
|
||||
* records.) This is currently only used for entry tree leaf pages.
|
||||
|
@@ -195,14 +195,14 @@ typedef struct xl_multi_insert_tuple
|
||||
*
|
||||
* Backup blk 0: new page
|
||||
*
|
||||
* If XLOG_HEAP_PREFIX_FROM_OLD or XLOG_HEAP_SUFFIX_FROM_OLD flags are set,
|
||||
* If XLH_UPDATE_PREFIX_FROM_OLD or XLH_UPDATE_SUFFIX_FROM_OLD flags are set,
|
||||
* the prefix and/or suffix come first, as one or two uint16s.
|
||||
*
|
||||
* After that, xl_heap_header and new tuple data follow. The new tuple
|
||||
* data doesn't include the prefix and suffix, which are copied from the
|
||||
* old tuple on replay.
|
||||
*
|
||||
* If HEAP_CONTAINS_NEW_TUPLE_DATA flag is given, the tuple data is
|
||||
* If XLH_UPDATE_CONTAINS_NEW_TUPLE flag is given, the tuple data is
|
||||
* included even if a full-page image was taken.
|
||||
*
|
||||
* Backup blk 1: old page, if different. (no data, just a reference to the blk)
|
||||
@@ -217,8 +217,8 @@ typedef struct xl_heap_update
|
||||
OffsetNumber new_offnum; /* new tuple's offset */
|
||||
|
||||
/*
|
||||
* If XLOG_HEAP_CONTAINS_OLD_TUPLE or XLOG_HEAP_CONTAINS_OLD_KEY flags are
|
||||
* set, a xl_heap_header struct and tuple data for the old tuple follows.
|
||||
* If XLH_UPDATE_CONTAINS_OLD_TUPLE or XLH_UPDATE_CONTAINS_OLD_KEY flags
|
||||
* are set, xl_heap_header and tuple data for the old tuple follow.
|
||||
*/
|
||||
} xl_heap_update;
|
||||
|
||||
|
@@ -328,7 +328,7 @@ typedef struct SpGistLeafTupleData
|
||||
{
|
||||
unsigned int tupstate:2, /* LIVE/REDIRECT/DEAD/PLACEHOLDER */
|
||||
size:30; /* large enough for any palloc'able value */
|
||||
OffsetNumber nextOffset; /* next tuple in chain, or InvalidOffset */
|
||||
OffsetNumber nextOffset; /* next tuple in chain, or InvalidOffsetNumber */
|
||||
ItemPointerData heapPtr; /* TID of represented heap tuple */
|
||||
/* leaf datum follows */
|
||||
} SpGistLeafTupleData;
|
||||
|
@@ -283,8 +283,8 @@ typedef struct xl_xact_abort
|
||||
|
||||
/* xl_xact_xinfo follows if XLOG_XACT_HAS_INFO */
|
||||
/* xl_xact_dbinfo follows if XINFO_HAS_DBINFO */
|
||||
/* xl_xact_subxacts follows if HAS_SUBXACT */
|
||||
/* xl_xact_relfilenodes follows if HAS_RELFILENODES */
|
||||
/* xl_xact_subxacts follows if XINFO_HAS_SUBXACT */
|
||||
/* xl_xact_relfilenodes follows if XINFO_HAS_RELFILENODES */
|
||||
/* No invalidation messages needed. */
|
||||
/* xl_xact_twophase follows if XINFO_HAS_TWOPHASE */
|
||||
/* twophase_gid follows if XINFO_HAS_GID. As a null-terminated string. */
|
||||
|
Reference in New Issue
Block a user