1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-22 14:32:25 +03:00

Phase 2 of pgindent updates.

Change pg_bsd_indent to follow upstream rules for placement of comments
to the right of code, and remove pgindent hack that caused comments
following #endif to not obey the general rule.

Commit e3860ffa4d wasn't actually using
the published version of pg_bsd_indent, but a hacked-up version that
tried to minimize the amount of movement of comments to the right of
code.  The situation of interest is where such a comment has to be
moved to the right of its default placement at column 33 because there's
code there.  BSD indent has always moved right in units of tab stops
in such cases --- but in the previous incarnation, indent was working
in 8-space tab stops, while now it knows we use 4-space tabs.  So the
net result is that in about half the cases, such comments are placed
one tab stop left of before.  This is better all around: it leaves
more room on the line for comment text, and it means that in such
cases the comment uniformly starts at the next 4-space tab stop after
the code, rather than sometimes one and sometimes two tabs after.

Also, ensure that comments following #endif are indented the same
as comments following other preprocessor commands such as #else.
That inconsistency turns out to have been self-inflicted damage
from a poorly-thought-through post-indent "fixup" in pgindent.

This patch is much less interesting than the first round of indent
changes, but also bulkier, so I thought it best to separate the effects.

Discussion: https://postgr.es/m/E1dAmxK-0006EE-1r@gemulon.postgresql.org
Discussion: https://postgr.es/m/30527.1495162840@sss.pgh.pa.us
This commit is contained in:
Tom Lane
2017-06-21 15:18:54 -04:00
parent f669c09989
commit c7b8998ebb
1107 changed files with 3433 additions and 3514 deletions

View File

@@ -203,19 +203,19 @@ typedef struct IndexAmRoutine
amcanreturn_function amcanreturn; /* can be NULL */
amcostestimate_function amcostestimate;
amoptions_function amoptions;
amproperty_function amproperty; /* can be NULL */
amproperty_function amproperty; /* can be NULL */
amvalidate_function amvalidate;
ambeginscan_function ambeginscan;
amrescan_function amrescan;
amgettuple_function amgettuple; /* can be NULL */
amgettuple_function amgettuple; /* can be NULL */
amgetbitmap_function amgetbitmap; /* can be NULL */
amendscan_function amendscan;
ammarkpos_function ammarkpos; /* can be NULL */
amrestrpos_function amrestrpos; /* can be NULL */
ammarkpos_function ammarkpos; /* can be NULL */
amrestrpos_function amrestrpos; /* can be NULL */
/* interface functions to support parallel index scans */
amestimateparallelscan_function amestimateparallelscan; /* can be NULL */
aminitparallelscan_function aminitparallelscan; /* can be NULL */
amestimateparallelscan_function amestimateparallelscan; /* can be NULL */
aminitparallelscan_function aminitparallelscan; /* can be NULL */
amparallelrescan_function amparallelrescan; /* can be NULL */
} IndexAmRoutine;
@@ -224,4 +224,4 @@ typedef struct IndexAmRoutine
extern IndexAmRoutine *GetIndexAmRoutine(Oid amhandler);
extern IndexAmRoutine *GetIndexAmRoutineByAmId(Oid amoid, bool noerror);
#endif /* AMAPI_H */
#endif /* AMAPI_H */

View File

@@ -33,4 +33,4 @@ extern bool check_amop_signature(Oid opno, Oid restype,
Oid lefttype, Oid righttype);
extern bool opfamily_can_sort_type(Oid opfamilyoid, Oid datatypeoid);
#endif /* AMVALIDATE_H */
#endif /* AMVALIDATE_H */

View File

@@ -61,4 +61,4 @@ typedef int16 AttrNumber;
#define AttrOffsetGetAttrNumber(attributeOffset) \
((AttrNumber) (1 + (attributeOffset)))
#endif /* ATTNUM_H */
#endif /* ATTNUM_H */

View File

@@ -49,4 +49,4 @@ typedef struct BrinStatsData
extern void brinGetStats(Relation index, BrinStatsData *stats);
#endif /* BRIN_H */
#endif /* BRIN_H */

View File

@@ -107,4 +107,4 @@ extern bytea *brinoptions(Datum reloptions, bool validate);
/* brin_validate.c */
extern bool brinvalidate(Oid opclassoid);
#endif /* BRIN_INTERNAL_H */
#endif /* BRIN_INTERNAL_H */

View File

@@ -93,4 +93,4 @@ typedef struct RevmapContents
#define REVMAP_PAGE_MAXITEMS \
(REVMAP_CONTENT_SIZE / sizeof(ItemPointerData))
#endif /* BRIN_PAGE_H */
#endif /* BRIN_PAGE_H */

View File

@@ -35,4 +35,4 @@ extern void brin_evacuate_page(Relation idxRel, BlockNumber pagesPerRange,
extern bool brin_page_cleanup(Relation idxrel, Buffer buf);
#endif /* BRIN_PAGEOPS_H */
#endif /* BRIN_PAGEOPS_H */

View File

@@ -38,4 +38,4 @@ extern BrinTuple *brinGetTupleForHeapBlock(BrinRevmap *revmap,
Size *size, int mode, Snapshot snapshot);
extern bool brinRevmapDesummarizeRange(Relation idxrel, BlockNumber heapBlk);
#endif /* BRIN_REVMAP_H */
#endif /* BRIN_REVMAP_H */

View File

@@ -99,4 +99,4 @@ extern BrinMemTuple *brin_memtuple_initialize(BrinMemTuple *dtuple,
extern BrinMemTuple *brin_deform_tuple(BrinDesc *brdesc,
BrinTuple *tuple, BrinMemTuple *dMemtuple);
#endif /* BRIN_TUPLE_H */
#endif /* BRIN_TUPLE_H */

View File

@@ -148,4 +148,4 @@ extern void brin_desc(StringInfo buf, XLogReaderState *record);
extern const char *brin_identify(uint8 info);
extern void brin_mask(char *pagedata, BlockNumber blkno);
#endif /* BRIN_XLOG_H */
#endif /* BRIN_XLOG_H */

View File

@@ -58,4 +58,4 @@ extern void clog_redo(XLogReaderState *record);
extern void clog_desc(StringInfo buf, XLogReaderState *record);
extern const char *clog_identify(uint8 info);
#endif /* CLOG_H */
#endif /* CLOG_H */

View File

@@ -74,4 +74,4 @@ extern void commit_ts_redo(XLogReaderState *record);
extern void commit_ts_desc(StringInfo buf, XLogReaderState *record);
extern const char *commit_ts_identify(uint8 info);
#endif /* COMMIT_TS_H */
#endif /* COMMIT_TS_H */

View File

@@ -48,7 +48,7 @@ typedef struct IndexVacuumInfo
bool estimated_count; /* num_heap_tuples is an estimate */
int message_level; /* ereport level for progress messages */
double num_heap_tuples; /* tuples remaining in heap */
BufferAccessStrategy strategy; /* access strategy for reads */
BufferAccessStrategy strategy; /* access strategy for reads */
} IndexVacuumInfo;
/*
@@ -73,7 +73,7 @@ typedef struct IndexBulkDeleteResult
BlockNumber num_pages; /* pages remaining in index */
BlockNumber pages_removed; /* # removed during vacuum operation */
bool estimated_count; /* num_index_tuples is an estimate */
double num_index_tuples; /* tuples remaining */
double num_index_tuples; /* tuples remaining */
double tuples_removed; /* # removed during vacuum operation */
BlockNumber pages_deleted; /* # unused pages in index */
BlockNumber pages_free; /* # pages available for reuse */
@@ -203,4 +203,4 @@ extern HeapTuple systable_getnext_ordered(SysScanDesc sysscan,
ScanDirection direction);
extern void systable_endscan_ordered(SysScanDesc sysscan);
#endif /* GENAM_H */
#endif /* GENAM_H */

View File

@@ -42,4 +42,4 @@ extern const char *generic_identify(uint8 info);
extern void generic_desc(StringInfo buf, XLogReaderState *record);
extern void generic_mask(char *pagedata, BlockNumber blkno);
#endif /* GENERIC_XLOG_H */
#endif /* GENERIC_XLOG_H */

View File

@@ -33,7 +33,7 @@
#define GIN_SEARCH_MODE_DEFAULT 0
#define GIN_SEARCH_MODE_INCLUDE_EMPTY 1
#define GIN_SEARCH_MODE_ALL 2
#define GIN_SEARCH_MODE_EVERYTHING 3 /* for internal use only */
#define GIN_SEARCH_MODE_EVERYTHING 3 /* for internal use only */
/*
* GinStatsData represents stats data for planner use
@@ -73,4 +73,4 @@ extern int gin_pending_list_limit;
extern void ginGetStats(Relation index, GinStatsData *stats);
extern void ginUpdateStats(Relation index, const GinStatsData *stats);
#endif /* GIN_H */
#endif /* GIN_H */

View File

@@ -75,7 +75,7 @@ typedef struct GinState
FmgrInfo extractQueryFn[INDEX_MAX_KEYS];
FmgrInfo consistentFn[INDEX_MAX_KEYS];
FmgrInfo triConsistentFn[INDEX_MAX_KEYS];
FmgrInfo comparePartialFn[INDEX_MAX_KEYS]; /* optional method */
FmgrInfo comparePartialFn[INDEX_MAX_KEYS]; /* optional method */
/* canPartialMatch[i] is true if comparePartialFn[i] is valid */
bool canPartialMatch[INDEX_MAX_KEYS];
/* Collations to pass to the support functions */
@@ -473,4 +473,4 @@ ginCompareItemPointers(ItemPointer a, ItemPointer b)
extern int ginTraverseLock(Buffer buffer, bool searchMode);
#endif /* GIN_PRIVATE_H */
#endif /* GIN_PRIVATE_H */

View File

@@ -41,7 +41,7 @@ typedef GinPageOpaqueData *GinPageOpaque;
#define GIN_DELETED (1 << 2)
#define GIN_META (1 << 3)
#define GIN_LIST (1 << 4)
#define GIN_LIST_FULLROW (1 << 5) /* makes sense only on GIN_LIST page */
#define GIN_LIST_FULLROW (1 << 5) /* makes sense only on GIN_LIST page */
#define GIN_INCOMPLETE_SPLIT (1 << 6) /* page was split, but parent not
* updated */
#define GIN_COMPRESSED (1 << 7)
@@ -196,10 +196,10 @@ typedef struct
*/
typedef signed char GinNullCategory;
#define GIN_CAT_NORM_KEY 0 /* normal, non-null key value */
#define GIN_CAT_NULL_KEY 1 /* null key value */
#define GIN_CAT_EMPTY_ITEM 2 /* placeholder for zero-key item */
#define GIN_CAT_NULL_ITEM 3 /* placeholder for null item */
#define GIN_CAT_NORM_KEY 0 /* normal, non-null key value */
#define GIN_CAT_NULL_KEY 1 /* null key value */
#define GIN_CAT_EMPTY_ITEM 2 /* placeholder for zero-key item */
#define GIN_CAT_NULL_ITEM 3 /* placeholder for null item */
#define GIN_CAT_EMPTY_QUERY (-1) /* placeholder for full-scan query */
/*
@@ -333,4 +333,4 @@ typedef struct
#define SizeOfGinPostingList(plist) (offsetof(GinPostingList, bytes) + SHORTALIGN((plist)->nbytes) )
#define GinNextPostingListSegment(cur) ((GinPostingList *) (((char *) (cur)) + SizeOfGinPostingList((cur))))
#endif /* GINBLOCK_H */
#endif /* GINBLOCK_H */

View File

@@ -90,11 +90,11 @@ typedef struct
} ginxlogSegmentAction;
/* Action types */
#define GIN_SEGMENT_UNMODIFIED 0 /* no action (not used in WAL records) */
#define GIN_SEGMENT_DELETE 1 /* a whole segment is removed */
#define GIN_SEGMENT_INSERT 2 /* a whole segment is added */
#define GIN_SEGMENT_REPLACE 3 /* a segment is replaced */
#define GIN_SEGMENT_ADDITEMS 4 /* items are added to existing segment */
#define GIN_SEGMENT_UNMODIFIED 0 /* no action (not used in WAL records) */
#define GIN_SEGMENT_DELETE 1 /* a whole segment is removed */
#define GIN_SEGMENT_INSERT 2 /* a whole segment is added */
#define GIN_SEGMENT_REPLACE 3 /* a segment is replaced */
#define GIN_SEGMENT_ADDITEMS 4 /* items are added to existing segment */
typedef struct
{
@@ -214,4 +214,4 @@ extern void gin_xlog_startup(void);
extern void gin_xlog_cleanup(void);
extern void gin_mask(char *pagedata, BlockNumber blkno);
#endif /* GINXLOG_H */
#endif /* GINXLOG_H */

View File

@@ -105,12 +105,12 @@ typedef struct GIST_SPLITVEC
OffsetNumber *spl_left; /* array of entries that go left */
int spl_nleft; /* size of this array */
Datum spl_ldatum; /* Union of keys in spl_left */
bool spl_ldatum_exists; /* true, if spl_ldatum already exists. */
bool spl_ldatum_exists; /* true, if spl_ldatum already exists. */
OffsetNumber *spl_right; /* array of entries that go right */
int spl_nright; /* size of the array */
Datum spl_rdatum; /* Union of keys in spl_right */
bool spl_rdatum_exists; /* true, if spl_rdatum already exists. */
bool spl_rdatum_exists; /* true, if spl_rdatum already exists. */
} GIST_SPLITVEC;
/*
@@ -170,4 +170,4 @@ typedef struct
do { (e).key = (k); (e).rel = (r); (e).page = (pg); \
(e).offset = (o); (e).leafkey = (l); } while (0)
#endif /* GIST_H */
#endif /* GIST_H */

View File

@@ -118,7 +118,7 @@ typedef struct GISTSearchHeapItem
{
ItemPointerData heapPtr;
bool recheck; /* T if quals must be rechecked */
bool recheckDistances; /* T if distances must be rechecked */
bool recheckDistances; /* T if distances must be rechecked */
HeapTuple recontup; /* data reconstructed from the index, used in
* index-only scans */
OffsetNumber offnum; /* track offset in page to mark tuple as
@@ -136,8 +136,8 @@ typedef struct GISTSearchItem
/* we must store parentlsn to detect whether a split occurred */
GISTSearchHeapItem heap; /* heap info, if heap tuple */
} data;
double distances[FLEXIBLE_ARRAY_MEMBER]; /* numberOfOrderBys
* entries */
double distances[FLEXIBLE_ARRAY_MEMBER]; /* numberOfOrderBys
* entries */
} GISTSearchItem;
#define GISTSearchItemIsHeap(item) ((item).blkno == InvalidBlockNumber)
@@ -225,12 +225,12 @@ typedef struct GistSplitVector
{
GIST_SPLITVEC splitVector; /* passed to/from user PickSplit method */
Datum spl_lattr[INDEX_MAX_KEYS]; /* Union of subkeys in
* splitVector.spl_left */
Datum spl_lattr[INDEX_MAX_KEYS]; /* Union of subkeys in
* splitVector.spl_left */
bool spl_lisnull[INDEX_MAX_KEYS];
Datum spl_rattr[INDEX_MAX_KEYS]; /* Union of subkeys in
* splitVector.spl_right */
Datum spl_rattr[INDEX_MAX_KEYS]; /* Union of subkeys in
* splitVector.spl_right */
bool spl_risnull[INDEX_MAX_KEYS];
bool *spl_dontcare; /* flags tuples which could go to either side
@@ -288,7 +288,7 @@ typedef struct
int32 blocksCount; /* current # of blocks occupied by buffer */
BlockNumber pageBlocknum; /* temporary file block # */
GISTNodeBufferPage *pageBuffer; /* in-memory buffer page */
GISTNodeBufferPage *pageBuffer; /* in-memory buffer page */
/* is this buffer queued for emptying? */
bool queuedForEmptying;
@@ -360,8 +360,8 @@ typedef struct GISTBuildBuffers
* loaded in main memory.
*/
GISTNodeBuffer **loadedBuffers;
int loadedBuffersCount; /* # of entries in loadedBuffers */
int loadedBuffersLen; /* allocated size of loadedBuffers */
int loadedBuffersCount; /* # of entries in loadedBuffers */
int loadedBuffersLen; /* allocated size of loadedBuffers */
/* Level of the current root node (= height of the index tree - 1) */
int rootlevel;
@@ -522,4 +522,4 @@ extern void gistRelocateBuildBuffersOnSplit(GISTBuildBuffers *gfbb,
List *splitinfo);
extern void gistUnloadNodeBuffers(GISTBuildBuffers *gfbb);
#endif /* GIST_PRIVATE_H */
#endif /* GIST_PRIVATE_H */

View File

@@ -21,4 +21,4 @@ extern void gistrescan(IndexScanDesc scan, ScanKey key, int nkeys,
ScanKey orderbys, int norderbys);
extern void gistendscan(IndexScanDesc scan);
#endif /* GISTSCAN_H */
#endif /* GISTSCAN_H */

View File

@@ -145,8 +145,7 @@ typedef struct HashScanOpaqueData
*/
bool hashso_buc_split;
/* info about killed items if any (killedItems is NULL if never used) */
HashScanPosItem *killedItems; /* tids and offset numbers of killed
* items */
HashScanPosItem *killedItems; /* tids and offset numbers of killed items */
int numKilled; /* number of currently stored items */
} HashScanOpaqueData;
@@ -218,8 +217,8 @@ typedef struct HashMetaPageData
uint32 hashm_firstfree; /* lowest-number free ovflpage (bit#) */
uint32 hashm_nmaps; /* number of bitmap pages */
RegProcedure hashm_procid; /* hash procedure id from pg_proc */
uint32 hashm_spares[HASH_MAX_SPLITPOINTS]; /* spare pages before
* each splitpoint */
uint32 hashm_spares[HASH_MAX_SPLITPOINTS]; /* spare pages before each
* splitpoint */
BlockNumber hashm_mapp[HASH_MAX_BITMAPS]; /* blknos of ovfl bitmaps */
} HashMetaPageData;
@@ -242,7 +241,7 @@ typedef HashMetaPageData *HashMetaPage;
/*
* Constants
*/
#define BYTE_TO_BIT 3 /* 2^3 bits/byte */
#define BYTE_TO_BIT 3 /* 2^3 bits/byte */
#define ALL_SET ((uint32) ~0)
/*
@@ -423,4 +422,4 @@ extern void hashbucketcleanup(Relation rel, Bucket cur_bucket,
bool bucket_has_garbage,
IndexBulkDeleteCallback callback, void *callback_state);
#endif /* HASH_H */
#endif /* HASH_H */

View File

@@ -24,14 +24,13 @@
/*
* XLOG records for hash operations
*/
#define XLOG_HASH_INIT_META_PAGE 0x00 /* initialize the meta page */
#define XLOG_HASH_INIT_BITMAP_PAGE 0x10 /* initialize the bitmap page */
#define XLOG_HASH_INIT_META_PAGE 0x00 /* initialize the meta page */
#define XLOG_HASH_INIT_BITMAP_PAGE 0x10 /* initialize the bitmap page */
#define XLOG_HASH_INSERT 0x20 /* add index tuple without split */
#define XLOG_HASH_ADD_OVFL_PAGE 0x30 /* add overflow page */
#define XLOG_HASH_SPLIT_ALLOCATE_PAGE 0x40 /* allocate new page for split */
#define XLOG_HASH_SPLIT_PAGE 0x50 /* split page */
#define XLOG_HASH_SPLIT_COMPLETE 0x60 /* completion of split
* operation */
#define XLOG_HASH_SPLIT_COMPLETE 0x60 /* completion of split operation */
#define XLOG_HASH_MOVE_PAGE_CONTENTS 0x70 /* remove tuples from one page
* and add to another page */
#define XLOG_HASH_SQUEEZE_PAGE 0x80 /* add tuples to one of the previous
@@ -41,11 +40,10 @@
#define XLOG_HASH_SPLIT_CLEANUP 0xA0 /* clear split-cleanup flag in primary
* bucket page after deleting tuples
* that are moved due to split */
#define XLOG_HASH_UPDATE_META_PAGE 0xB0 /* update meta page after
* vacuum */
#define XLOG_HASH_UPDATE_META_PAGE 0xB0 /* update meta page after vacuum */
#define XLOG_HASH_VACUUM_ONE_PAGE 0xC0 /* remove dead tuples from
* index page */
#define XLOG_HASH_VACUUM_ONE_PAGE 0xC0 /* remove dead tuples from index
* page */
/*
* xl_hash_split_allocate_page flag values, 8 bits are available.
@@ -151,9 +149,9 @@ typedef struct xl_hash_split_complete
typedef struct xl_hash_move_page_contents
{
uint16 ntups;
bool is_prim_bucket_same_wrt; /* TRUE if the page to which
* tuples are moved is same as
* primary bucket page */
bool is_prim_bucket_same_wrt; /* TRUE if the page to which
* tuples are moved is same as
* primary bucket page */
} xl_hash_move_page_contents;
#define SizeOfHashMovePageContents \
@@ -176,13 +174,13 @@ typedef struct xl_hash_squeeze_page
BlockNumber prevblkno;
BlockNumber nextblkno;
uint16 ntups;
bool is_prim_bucket_same_wrt; /* TRUE if the page to which
* tuples are moved is same as
* primary bucket page */
bool is_prev_bucket_same_wrt; /* TRUE if the page to which
* tuples are moved is the
* page previous to the freed
* overflow page */
bool is_prim_bucket_same_wrt; /* TRUE if the page to which
* tuples are moved is same as
* primary bucket page */
bool is_prev_bucket_same_wrt; /* TRUE if the page to which
* tuples are moved is the page
* previous to the freed overflow
* page */
} xl_hash_squeeze_page;
#define SizeOfHashSqueezePage \
@@ -198,8 +196,8 @@ typedef struct xl_hash_squeeze_page
*/
typedef struct xl_hash_delete
{
bool clear_dead_marking; /* TRUE if this operation clears
* LH_PAGE_HAS_DEAD_TUPLES flag */
bool clear_dead_marking; /* TRUE if this operation clears
* LH_PAGE_HAS_DEAD_TUPLES flag */
bool is_primary_bucket_page; /* TRUE if the operation is for
* primary bucket page */
} xl_hash_delete;
@@ -279,4 +277,4 @@ extern void hash_desc(StringInfo buf, XLogReaderState *record);
extern const char *hash_identify(uint8 info);
extern void hash_mask(char *pagedata, BlockNumber blkno);
#endif /* HASH_XLOG_H */
#endif /* HASH_XLOG_H */

View File

@@ -198,4 +198,4 @@ extern BlockNumber ss_get_location(Relation rel, BlockNumber relnblocks);
extern void SyncScanShmemInit(void);
extern Size SyncScanShmemSize(void);
#endif /* HEAPAM_H */
#endif /* HEAPAM_H */

View File

@@ -189,7 +189,7 @@ typedef struct xl_heap_update
{
TransactionId old_xmax; /* xmax of the old tuple */
OffsetNumber old_offnum; /* old tuple's offset */
uint8 old_infobits_set; /* infomask bits to set on old tuple */
uint8 old_infobits_set; /* infomask bits to set on old tuple */
uint8 flags;
TransactionId new_xmax; /* xmax of the new tuple */
OffsetNumber new_offnum; /* new tuple's offset */
@@ -399,4 +399,4 @@ extern void heap_execute_freeze_tuple(HeapTupleHeader tuple,
extern XLogRecPtr log_heap_visible(RelFileNode rnode, Buffer heap_buffer,
Buffer vm_buffer, TransactionId cutoff_xid, uint8 flags);
#endif /* HEAPAM_XLOG_H */
#endif /* HEAPAM_XLOG_H */

View File

@@ -30,7 +30,7 @@
*/
typedef struct BulkInsertStateData
{
BufferAccessStrategy strategy; /* our BULKWRITE strategy object */
BufferAccessStrategy strategy; /* our BULKWRITE strategy object */
Buffer current_buf; /* current insertion target page */
} BulkInsertStateData;
@@ -42,4 +42,4 @@ extern Buffer RelationGetBufferForTuple(Relation relation, Size len,
BulkInsertState bistate,
Buffer *vmbuffer, Buffer *vmbuffer_other);
#endif /* HIO_H */
#endif /* HIO_H */

View File

@@ -85,4 +85,4 @@ extern void HeapTupleHeaderAdjustCmax(HeapTupleHeader tup,
/* Prototype for HeapTupleHeader accessors in heapam.c */
extern TransactionId HeapTupleGetUpdateXid(HeapTupleHeader tuple);
#endif /* HTUP_H */
#endif /* HTUP_H */

View File

@@ -748,7 +748,7 @@ struct MinimalTupleData
extern Datum fastgetattr(HeapTuple tup, int attnum, TupleDesc tupleDesc,
bool *isnull);
#endif /* defined(DISABLE_COMPLEX_MACRO) */
#endif /* defined(DISABLE_COMPLEX_MACRO) */
/* ----------------
@@ -821,4 +821,4 @@ extern MinimalTuple heap_copy_minimal_tuple(MinimalTuple mtup);
extern HeapTuple heap_tuple_from_minimal_tuple(MinimalTuple mtup);
extern MinimalTuple minimal_tuple_from_heap_tuple(HeapTuple htup);
#endif /* HTUP_DETAILS_H */
#endif /* HTUP_DETAILS_H */

View File

@@ -148,4 +148,4 @@ extern void index_deform_tuple(IndexTuple tup, TupleDesc tupleDescriptor,
Datum *values, bool *isnull);
extern IndexTuple CopyIndexTuple(IndexTuple source);
#endif /* ITUP_H */
#endif /* ITUP_H */

View File

@@ -157,4 +157,4 @@ extern const char *multixact_identify(uint8 info);
extern char *mxid_to_string(MultiXactId multi, int nmembers,
MultiXactMember *members);
#endif /* MULTIXACT_H */
#endif /* MULTIXACT_H */

View File

@@ -421,9 +421,9 @@ typedef BTScanOpaqueData *BTScanOpaque;
* to use bits 16-31 (see skey.h). The uppermost bits are copied from the
* index's indoption[] array entry for the index attribute.
*/
#define SK_BT_REQFWD 0x00010000 /* required to continue forward scan */
#define SK_BT_REQBKWD 0x00020000 /* required to continue backward scan */
#define SK_BT_INDOPTION_SHIFT 24 /* must clear the above bits */
#define SK_BT_REQFWD 0x00010000 /* required to continue forward scan */
#define SK_BT_REQBKWD 0x00020000 /* required to continue backward scan */
#define SK_BT_INDOPTION_SHIFT 24 /* must clear the above bits */
#define SK_BT_DESC (INDOPTION_DESC << SK_BT_INDOPTION_SHIFT)
#define SK_BT_NULLS_FIRST (INDOPTION_NULLS_FIRST << SK_BT_INDOPTION_SHIFT)
@@ -556,4 +556,4 @@ extern void _bt_spool(BTSpool *btspool, ItemPointer self,
Datum *values, bool *isnull);
extern void _bt_leafbuild(BTSpool *btspool, BTSpool *spool2);
#endif /* NBTREE_H */
#endif /* NBTREE_H */

View File

@@ -32,9 +32,9 @@
#define XLOG_BTREE_SPLIT_R_ROOT 0x60 /* as above, new item on right */
#define XLOG_BTREE_DELETE 0x70 /* delete leaf index tuples for a page */
#define XLOG_BTREE_UNLINK_PAGE 0x80 /* delete a half-dead page */
#define XLOG_BTREE_UNLINK_PAGE_META 0x90 /* same, and update metapage */
#define XLOG_BTREE_UNLINK_PAGE_META 0x90 /* same, and update metapage */
#define XLOG_BTREE_NEWROOT 0xA0 /* new root page */
#define XLOG_BTREE_MARK_PAGE_HALFDEAD 0xB0 /* mark a leaf as half-dead */
#define XLOG_BTREE_MARK_PAGE_HALFDEAD 0xB0 /* mark a leaf as half-dead */
#define XLOG_BTREE_VACUUM 0xC0 /* delete entries on a page during
* vacuum */
#define XLOG_BTREE_REUSE_PAGE 0xD0 /* old page is about to be reused from
@@ -252,4 +252,4 @@ extern void btree_desc(StringInfo buf, XLogReaderState *record);
extern const char *btree_identify(uint8 info);
extern void btree_mask(char *pagedata, BlockNumber blkno);
#endif /* NBXLOG_H */
#endif /* NBXLOG_H */

View File

@@ -67,4 +67,4 @@ extern void ParallelWorkerReportLastRecEnd(XLogRecPtr last_xlog_end);
extern void ParallelWorkerMain(Datum main_arg);
#endif /* PARALLEL_H */
#endif /* PARALLEL_H */

View File

@@ -20,4 +20,4 @@ extern bool printsimple(TupleTableSlot *slot, DestReceiver *self);
extern void printsimple_startup(DestReceiver *self, int operation,
TupleDesc tupdesc);
#endif /* PRINTSIMPLE_H */
#endif /* PRINTSIMPLE_H */

View File

@@ -32,4 +32,4 @@ extern void spi_dest_startup(DestReceiver *self, int operation,
TupleDesc typeinfo);
extern bool spi_printtup(TupleTableSlot *slot, DestReceiver *self);
#endif /* PRINTTUP_H */
#endif /* PRINTTUP_H */

View File

@@ -280,4 +280,4 @@ extern bytea *attribute_reloptions(Datum reloptions, bool validate);
extern bytea *tablespace_reloptions(Datum reloptions, bool validate);
extern LOCKMODE AlterTableGetRelOptionsLockLevel(List *defList);
#endif /* RELOPTIONS_H */
#endif /* RELOPTIONS_H */

View File

@@ -89,14 +89,14 @@ typedef struct IndexScanDescData
Relation indexRelation; /* index relation descriptor */
Snapshot xs_snapshot; /* snapshot to see */
int numberOfKeys; /* number of index qualifier conditions */
int numberOfOrderBys; /* number of ordering operators */
int numberOfOrderBys; /* number of ordering operators */
ScanKey keyData; /* array of index qualifier descriptors */
ScanKey orderByData; /* array of ordering op descriptors */
bool xs_want_itup; /* caller requests index tuples */
bool xs_temp_snap; /* unregister snapshot at scan end? */
/* signaling to index AM about killing index tuples */
bool kill_prior_tuple; /* last-returned tuple is dead */
bool kill_prior_tuple; /* last-returned tuple is dead */
bool ignore_killed_tuples; /* do not return killed entries */
bool xactStartedInRecovery; /* prevents killing/seeing killed
* tuples */
@@ -158,4 +158,4 @@ typedef struct SysScanDescData
Snapshot snapshot; /* snapshot to unregister at end of scan */
} SysScanDescData;
#endif /* RELSCAN_H */
#endif /* RELSCAN_H */

View File

@@ -54,4 +54,4 @@ typedef struct LogicalRewriteMappingData
#define LOGICAL_REWRITE_FORMAT "map-%x-%x-%X_%X-%x-%x"
void CheckPointLogicalRewriteHeap(void);
#endif /* REWRITE_HEAP_H */
#endif /* REWRITE_HEAP_H */

View File

@@ -32,4 +32,4 @@ typedef enum RmgrIds
#define RM_MAX_ID (RM_NEXT_ID - 1)
#endif /* RMGR_H */
#endif /* RMGR_H */

View File

@@ -55,4 +55,4 @@ typedef enum ScanDirection
#define ScanDirectionIsForward(direction) \
((bool) ((direction) == ForwardScanDirection))
#endif /* SDIR_H */
#endif /* SDIR_H */

View File

@@ -112,16 +112,15 @@ typedef ScanKeyData *ScanKey;
* bits should be defined here). Bits 16-31 are reserved for use within
* individual index access methods.
*/
#define SK_ISNULL 0x0001 /* sk_argument is NULL */
#define SK_UNARY 0x0002 /* unary operator (not supported!) */
#define SK_ROW_HEADER 0x0004 /* row comparison header (see above) */
#define SK_ROW_MEMBER 0x0008 /* row comparison member (see above) */
#define SK_ROW_END 0x0010 /* last row comparison member */
#define SK_SEARCHARRAY 0x0020 /* scankey represents ScalarArrayOp */
#define SK_SEARCHNULL 0x0040 /* scankey represents "col IS NULL" */
#define SK_SEARCHNOTNULL 0x0080 /* scankey represents "col IS NOT
* NULL" */
#define SK_ORDER_BY 0x0100 /* scankey is for ORDER BY op */
#define SK_ISNULL 0x0001 /* sk_argument is NULL */
#define SK_UNARY 0x0002 /* unary operator (not supported!) */
#define SK_ROW_HEADER 0x0004 /* row comparison header (see above) */
#define SK_ROW_MEMBER 0x0008 /* row comparison member (see above) */
#define SK_ROW_END 0x0010 /* last row comparison member */
#define SK_SEARCHARRAY 0x0020 /* scankey represents ScalarArrayOp */
#define SK_SEARCHNULL 0x0040 /* scankey represents "col IS NULL" */
#define SK_SEARCHNOTNULL 0x0080 /* scankey represents "col IS NOT NULL" */
#define SK_ORDER_BY 0x0100 /* scankey is for ORDER BY op */
/*
@@ -149,4 +148,4 @@ extern void ScanKeyEntryInitializeWithInfo(ScanKey entry,
FmgrInfo *finfo,
Datum argument);
#endif /* SKEY_H */
#endif /* SKEY_H */

View File

@@ -165,4 +165,4 @@ extern bool SlruScanDirCbReportPresence(SlruCtl ctl, char *filename,
extern bool SlruScanDirCbDeleteAll(SlruCtl ctl, char *filename, int segpage,
void *data);
#endif /* SLRU_H */
#endif /* SLRU_H */

View File

@@ -74,33 +74,33 @@ typedef enum spgChooseResultType
typedef struct spgChooseOut
{
spgChooseResultType resultType; /* action code, see above */
spgChooseResultType resultType; /* action code, see above */
union
{
struct /* results for spgMatchNode */
{
int nodeN; /* descend to this node (index from 0) */
int levelAdd; /* increment level by this much */
Datum restDatum; /* new leaf datum */
int levelAdd; /* increment level by this much */
Datum restDatum; /* new leaf datum */
} matchNode;
struct /* results for spgAddNode */
{
Datum nodeLabel; /* new node's label */
Datum nodeLabel; /* new node's label */
int nodeN; /* where to insert it (index from 0) */
} addNode;
struct /* results for spgSplitTuple */
{
/* Info to form new upper-level inner tuple with one child tuple */
bool prefixHasPrefix; /* tuple should have a prefix? */
Datum prefixPrefixDatum; /* if so, its value */
bool prefixHasPrefix; /* tuple should have a prefix? */
Datum prefixPrefixDatum; /* if so, its value */
int prefixNNodes; /* number of nodes */
Datum *prefixNodeLabels; /* their labels (or NULL for
* no labels) */
int childNodeN; /* which node gets child tuple */
Datum *prefixNodeLabels; /* their labels (or NULL for no
* labels) */
int childNodeN; /* which node gets child tuple */
/* Info to form new lower-level inner tuple with all old nodes */
bool postfixHasPrefix; /* tuple should have a prefix? */
Datum postfixPrefixDatum; /* if so, its value */
bool postfixHasPrefix; /* tuple should have a prefix? */
Datum postfixPrefixDatum; /* if so, its value */
} splitTuple;
} result;
} spgChooseOut;
@@ -123,7 +123,7 @@ typedef struct spgPickSplitOut
int nNodes; /* number of nodes for new inner tuple */
Datum *nodeLabels; /* their labels (or NULL for no labels) */
int *mapTuplesToNodes; /* node index for each leaf tuple */
int *mapTuplesToNodes; /* node index for each leaf tuple */
Datum *leafTupleDatums; /* datum to store in each new leaf tuple */
} spgPickSplitOut;
@@ -135,10 +135,9 @@ typedef struct spgInnerConsistentIn
ScanKey scankeys; /* array of operators and comparison values */
int nkeys; /* length of array */
Datum reconstructedValue; /* value reconstructed at parent */
Datum reconstructedValue; /* value reconstructed at parent */
void *traversalValue; /* opclass-specific traverse value */
MemoryContext traversalMemoryContext; /* put new traverse values
* here */
MemoryContext traversalMemoryContext; /* put new traverse values here */
int level; /* current level (counting from zero) */
bool returnData; /* original data must be returned? */
@@ -167,7 +166,7 @@ typedef struct spgLeafConsistentIn
ScanKey scankeys; /* array of operators and comparison values */
int nkeys; /* length of array */
Datum reconstructedValue; /* value reconstructed at parent */
Datum reconstructedValue; /* value reconstructed at parent */
void *traversalValue; /* opclass-specific traverse value */
int level; /* current level (counting from zero) */
bool returnData; /* original data must be returned? */
@@ -214,4 +213,4 @@ extern IndexBulkDeleteResult *spgvacuumcleanup(IndexVacuumInfo *info,
/* spgvalidate.c */
extern bool spgvalidate(Oid opclassoid);
#endif /* SPGIST_H */
#endif /* SPGIST_H */

View File

@@ -48,8 +48,8 @@ typedef SpGistPageOpaqueData *SpGistPageOpaque;
/* Flag bits in page special space */
#define SPGIST_META (1<<0)
#define SPGIST_DELETED (1<<1) /* never set, but keep for backwards
* compatibility */
#define SPGIST_DELETED (1<<1) /* never set, but keep for backwards
* compatibility */
#define SPGIST_LEAF (1<<2)
#define SPGIST_NULLS (1<<3)
@@ -94,7 +94,7 @@ typedef struct SpGistLUPCache
typedef struct SpGistMetaPageData
{
uint32 magicNumber; /* for identity cross-check */
SpGistLUPCache lastUsedPages; /* shared storage of last-used info */
SpGistLUPCache lastUsedPages; /* shared storage of last-used info */
} SpGistMetaPageData;
#define SPGIST_MAGIC_NUMBER (0xBA0BABEE)
@@ -120,10 +120,10 @@ typedef struct SpGistState
spgConfigOut config; /* filled in by opclass config method */
SpGistTypeDesc attType; /* type of input data and leaf values */
SpGistTypeDesc attPrefixType; /* type of inner-tuple prefix values */
SpGistTypeDesc attPrefixType; /* type of inner-tuple prefix values */
SpGistTypeDesc attLabelType; /* type of node label values */
char *deadTupleStorage; /* workspace for spgFormDeadTuple */
char *deadTupleStorage; /* workspace for spgFormDeadTuple */
TransactionId myXid; /* XID to use when creating a redirect tuple */
bool isBuild; /* true if doing index build */
@@ -159,7 +159,7 @@ typedef struct SpGistScanOpaqueData
int iPtr; /* index for scanning through same */
ItemPointerData heapPtrs[MaxIndexTuplesPerPage]; /* TIDs from cur page */
bool recheck[MaxIndexTuplesPerPage]; /* their recheck flags */
HeapTuple reconTups[MaxIndexTuplesPerPage]; /* reconstructed tuples */
HeapTuple reconTups[MaxIndexTuplesPerPage]; /* reconstructed tuples */
/*
* Note: using MaxIndexTuplesPerPage above is a bit hokey since
@@ -179,10 +179,10 @@ typedef struct SpGistCache
spgConfigOut config; /* filled in by opclass config method */
SpGistTypeDesc attType; /* type of input data and leaf values */
SpGistTypeDesc attPrefixType; /* type of inner-tuple prefix values */
SpGistTypeDesc attPrefixType; /* type of inner-tuple prefix values */
SpGistTypeDesc attLabelType; /* type of node label values */
SpGistLUPCache lastUsedPages; /* local storage of last-used info */
SpGistLUPCache lastUsedPages; /* local storage of last-used info */
} SpGistCache;
@@ -418,4 +418,4 @@ extern void spgPageIndexMultiDelete(SpGistState *state, Page page,
extern bool spgdoinsert(Relation index, SpGistState *state,
ItemPointer heapPtr, Datum datum, bool isnull);
#endif /* SPGIST_PRIVATE_H */
#endif /* SPGIST_PRIVATE_H */

View File

@@ -238,7 +238,7 @@ typedef struct spgxlogVacuumRoot
typedef struct spgxlogVacuumRedirect
{
uint16 nToPlaceholder; /* number of redirects to make placeholders */
OffsetNumber firstPlaceholder; /* first placeholder tuple to remove */
OffsetNumber firstPlaceholder; /* first placeholder tuple to remove */
TransactionId newestRedirectXid; /* newest XID of removed redirects */
/* offsets of redirect tuples to make placeholders follow */
@@ -254,4 +254,4 @@ extern void spg_xlog_startup(void);
extern void spg_xlog_cleanup(void);
extern void spg_mask(char *pagedata, BlockNumber blkno);
#endif /* SPGXLOG_H */
#endif /* SPGXLOG_H */

View File

@@ -41,35 +41,35 @@ typedef uint16 StrategyNumber;
* The first few of these come from the R-Tree indexing method (hence the
* names); the others have been added over time as they have been needed.
*/
#define RTLeftStrategyNumber 1 /* for << */
#define RTOverLeftStrategyNumber 2 /* for &< */
#define RTOverlapStrategyNumber 3 /* for && */
#define RTOverRightStrategyNumber 4 /* for &> */
#define RTRightStrategyNumber 5 /* for >> */
#define RTSameStrategyNumber 6 /* for ~= */
#define RTContainsStrategyNumber 7 /* for @> */
#define RTContainedByStrategyNumber 8 /* for <@ */
#define RTOverBelowStrategyNumber 9 /* for &<| */
#define RTBelowStrategyNumber 10 /* for <<| */
#define RTAboveStrategyNumber 11 /* for |>> */
#define RTOverAboveStrategyNumber 12 /* for |&> */
#define RTOldContainsStrategyNumber 13 /* for old spelling of @> */
#define RTOldContainedByStrategyNumber 14 /* for old spelling of <@ */
#define RTKNNSearchStrategyNumber 15 /* for <-> (distance) */
#define RTContainsElemStrategyNumber 16 /* for range types @> elem */
#define RTAdjacentStrategyNumber 17 /* for -|- */
#define RTEqualStrategyNumber 18 /* for = */
#define RTNotEqualStrategyNumber 19 /* for != */
#define RTLessStrategyNumber 20 /* for < */
#define RTLessEqualStrategyNumber 21 /* for <= */
#define RTGreaterStrategyNumber 22 /* for > */
#define RTGreaterEqualStrategyNumber 23 /* for >= */
#define RTSubStrategyNumber 24 /* for inet >> */
#define RTSubEqualStrategyNumber 25 /* for inet <<= */
#define RTSuperStrategyNumber 26 /* for inet << */
#define RTSuperEqualStrategyNumber 27 /* for inet >>= */
#define RTLeftStrategyNumber 1 /* for << */
#define RTOverLeftStrategyNumber 2 /* for &< */
#define RTOverlapStrategyNumber 3 /* for && */
#define RTOverRightStrategyNumber 4 /* for &> */
#define RTRightStrategyNumber 5 /* for >> */
#define RTSameStrategyNumber 6 /* for ~= */
#define RTContainsStrategyNumber 7 /* for @> */
#define RTContainedByStrategyNumber 8 /* for <@ */
#define RTOverBelowStrategyNumber 9 /* for &<| */
#define RTBelowStrategyNumber 10 /* for <<| */
#define RTAboveStrategyNumber 11 /* for |>> */
#define RTOverAboveStrategyNumber 12 /* for |&> */
#define RTOldContainsStrategyNumber 13 /* for old spelling of @> */
#define RTOldContainedByStrategyNumber 14 /* for old spelling of <@ */
#define RTKNNSearchStrategyNumber 15 /* for <-> (distance) */
#define RTContainsElemStrategyNumber 16 /* for range types @> elem */
#define RTAdjacentStrategyNumber 17 /* for -|- */
#define RTEqualStrategyNumber 18 /* for = */
#define RTNotEqualStrategyNumber 19 /* for != */
#define RTLessStrategyNumber 20 /* for < */
#define RTLessEqualStrategyNumber 21 /* for <= */
#define RTGreaterStrategyNumber 22 /* for > */
#define RTGreaterEqualStrategyNumber 23 /* for >= */
#define RTSubStrategyNumber 24 /* for inet >> */
#define RTSubEqualStrategyNumber 25 /* for inet <<= */
#define RTSuperStrategyNumber 26 /* for inet << */
#define RTSuperEqualStrategyNumber 27 /* for inet >>= */
#define RTMaxStrategyNumber 27
#endif /* STRATNUM_H */
#endif /* STRATNUM_H */

View File

@@ -27,4 +27,4 @@ extern void CheckPointSUBTRANS(void);
extern void ExtendSUBTRANS(TransactionId newestXact);
extern void TruncateSUBTRANS(TransactionId oldestXact);
#endif /* SUBTRANS_H */
#endif /* SUBTRANS_H */

View File

@@ -27,4 +27,4 @@
#define TableOidAttributeNumber (-7)
#define FirstLowInvalidHeapAttributeNumber (-8)
#endif /* SYSATTR_H */
#endif /* SYSATTR_H */

View File

@@ -41,4 +41,4 @@ extern TimeLineID tliOfPointInHistory(XLogRecPtr ptr, List *history);
extern XLogRecPtr tliSwitchPoint(TimeLineID tli, List *history,
TimeLineID *nextTLI);
#endif /* TIMELINE_H */
#endif /* TIMELINE_H */

View File

@@ -183,4 +183,4 @@ extern void AdvanceOldestClogXid(TransactionId oldest_datfrozenxid);
extern bool ForceTransactionIdLimitUpdate(void);
extern Oid GetNewObjectId(void);
#endif /* TRAMSAM_H */
#endif /* TRAMSAM_H */

View File

@@ -67,15 +67,15 @@ typedef struct TsmRoutine
SampleScanGetSampleSize_function SampleScanGetSampleSize;
/* Functions for executing a SampleScan on a physical table */
InitSampleScan_function InitSampleScan; /* can be NULL */
InitSampleScan_function InitSampleScan; /* can be NULL */
BeginSampleScan_function BeginSampleScan;
NextSampleBlock_function NextSampleBlock; /* can be NULL */
NextSampleTuple_function NextSampleTuple;
EndSampleScan_function EndSampleScan; /* can be NULL */
EndSampleScan_function EndSampleScan; /* can be NULL */
} TsmRoutine;
/* Functions in access/tablesample/tablesample.c */
extern TsmRoutine *GetTsmRoutine(Oid tsmhandler);
#endif /* TSMAPI_H */
#endif /* TSMAPI_H */

View File

@@ -46,4 +46,4 @@ extern HeapTuple do_convert_tuple(HeapTuple tuple, TupleConversionMap *map);
extern void free_conversion_map(TupleConversionMap *map);
#endif /* TUPCONVERT_H */
#endif /* TUPCONVERT_H */

View File

@@ -134,4 +134,4 @@ extern TupleDesc BuildDescForRelation(List *schema);
extern TupleDesc BuildDescFromLists(List *names, List *types, List *typmods, List *collations);
#endif /* TUPDESC_H */
#endif /* TUPDESC_H */

View File

@@ -88,7 +88,7 @@
: \
PointerGetDatum((char *) (T)) \
)
#endif /* SIZEOF_DATUM == 8 */
#endif /* SIZEOF_DATUM == 8 */
/*
* att_align_datum aligns the given offset as needed for a datum of alignment
@@ -238,6 +238,6 @@
break; \
} \
} while (0)
#endif /* SIZEOF_DATUM == 8 */
#endif /* SIZEOF_DATUM == 8 */
#endif

View File

@@ -84,7 +84,7 @@
*
* NB: Changing TOAST_MAX_CHUNK_SIZE requires an initdb.
*/
#define EXTERN_TUPLES_PER_PAGE 4 /* tweak only this */
#define EXTERN_TUPLES_PER_PAGE 4 /* tweak only this */
#define EXTERN_TUPLE_MAX_SIZE MaximumBytesPerTuple(EXTERN_TUPLES_PER_PAGE)
@@ -236,4 +236,4 @@ extern Size toast_datum_size(Datum value);
*/
extern Oid toast_get_valid_index(Oid toastoid, LOCKMODE lock);
#endif /* TUPTOASTER_H */
#endif /* TUPTOASTER_H */

View File

@@ -57,4 +57,4 @@ extern void PrepareRedoAdd(char *buf, XLogRecPtr start_lsn,
XLogRecPtr end_lsn);
extern void PrepareRedoRemove(TransactionId xid, bool giveWarning);
extern void restoreTwoPhaseData(void);
#endif /* TWOPHASE_H */
#endif /* TWOPHASE_H */

View File

@@ -37,4 +37,4 @@ extern const TwoPhaseCallback twophase_standby_recover_callbacks[];
extern void RegisterTwoPhaseRecord(TwoPhaseRmgrId rmid, uint16 info,
const void *data, uint32 len);
#endif /* TWOPHASE_RMGR_H */
#endif /* TWOPHASE_RMGR_H */

View File

@@ -66,4 +66,4 @@ do \
} \
} while (0)
#endif /* VALID_H */
#endif /* VALID_H */

View File

@@ -25,8 +25,8 @@
/* Flags for bit map */
#define VISIBILITYMAP_ALL_VISIBLE 0x01
#define VISIBILITYMAP_ALL_FROZEN 0x02
#define VISIBILITYMAP_VALID_BITS 0x03 /* OR of all valid
* visibilitymap flags bits */
#define VISIBILITYMAP_VALID_BITS 0x03 /* OR of all valid visibilitymap
* flags bits */
/* Macros for visibilitymap test */
#define VM_ALL_VISIBLE(r, b, v) \
@@ -46,4 +46,4 @@ extern uint8 visibilitymap_get_status(Relation rel, BlockNumber heapBlk, Buffer
extern void visibilitymap_count(Relation rel, BlockNumber *all_visible, BlockNumber *all_frozen);
extern void visibilitymap_truncate(Relation rel, BlockNumber nheapblocks);
#endif /* VISIBILITYMAP_H */
#endif /* VISIBILITYMAP_H */

View File

@@ -57,12 +57,11 @@ extern bool XactDeferrable;
typedef enum
{
SYNCHRONOUS_COMMIT_OFF, /* asynchronous commit */
SYNCHRONOUS_COMMIT_LOCAL_FLUSH, /* wait for local flush only */
SYNCHRONOUS_COMMIT_LOCAL_FLUSH, /* wait for local flush only */
SYNCHRONOUS_COMMIT_REMOTE_WRITE, /* wait for local flush and remote
* write */
SYNCHRONOUS_COMMIT_REMOTE_FLUSH, /* wait for local and remote flush */
SYNCHRONOUS_COMMIT_REMOTE_APPLY /* wait for local flush and remote
* apply */
SYNCHRONOUS_COMMIT_REMOTE_APPLY /* wait for local flush and remote apply */
} SyncCommitLevel;
/* Define the default setting for synchronous_commit */
@@ -405,4 +404,4 @@ extern void EnterParallelMode(void);
extern void ExitParallelMode(void);
extern bool IsInParallelMode(void);
#endif /* XACT_H */
#endif /* XACT_H */

View File

@@ -24,9 +24,9 @@
/* Sync methods */
#define SYNC_METHOD_FSYNC 0
#define SYNC_METHOD_FDATASYNC 1
#define SYNC_METHOD_OPEN 2 /* for O_SYNC */
#define SYNC_METHOD_OPEN 2 /* for O_SYNC */
#define SYNC_METHOD_FSYNC_WRITETHROUGH 3
#define SYNC_METHOD_OPEN_DSYNC 4 /* for O_DSYNC */
#define SYNC_METHOD_OPEN_DSYNC 4 /* for O_DSYNC */
extern int sync_method;
extern PGDLLIMPORT TimeLineID ThisTimeLineID; /* current TLI */
@@ -173,9 +173,8 @@ extern bool XLOG_DEBUG;
/* These directly affect the behavior of CreateCheckPoint and subsidiaries */
#define CHECKPOINT_IS_SHUTDOWN 0x0001 /* Checkpoint is for shutdown */
#define CHECKPOINT_END_OF_RECOVERY 0x0002 /* Like shutdown checkpoint,
* but issued at end of WAL
* recovery */
#define CHECKPOINT_END_OF_RECOVERY 0x0002 /* Like shutdown checkpoint, but
* issued at end of WAL recovery */
#define CHECKPOINT_IMMEDIATE 0x0004 /* Do it without delays */
#define CHECKPOINT_FORCE 0x0008 /* Force even if no activity */
#define CHECKPOINT_FLUSH_ALL 0x0010 /* Flush all pages, including those
@@ -202,18 +201,18 @@ typedef struct CheckpointStatsData
TimestampTz ckpt_sync_end_t; /* end of fsyncs */
TimestampTz ckpt_end_t; /* end of checkpoint */
int ckpt_bufs_written; /* # of buffers written */
int ckpt_bufs_written; /* # of buffers written */
int ckpt_segs_added; /* # of new xlog segments created */
int ckpt_segs_removed; /* # of xlog segments deleted */
int ckpt_segs_recycled; /* # of xlog segments recycled */
int ckpt_segs_removed; /* # of xlog segments deleted */
int ckpt_segs_recycled; /* # of xlog segments recycled */
int ckpt_sync_rels; /* # of relations synced */
uint64 ckpt_longest_sync; /* Longest sync for one relation */
uint64 ckpt_agg_sync_time; /* The sum of all the individual sync
* times, which is not necessarily the
* same as the total elapsed time for
* the entire sync phase. */
uint64 ckpt_longest_sync; /* Longest sync for one relation */
uint64 ckpt_agg_sync_time; /* The sum of all the individual sync
* times, which is not necessarily the
* same as the total elapsed time for the
* entire sync phase. */
} CheckpointStatsData;
extern CheckpointStatsData CheckpointStats;
@@ -324,4 +323,4 @@ extern SessionBackupState get_backup_status(void);
#define TABLESPACE_MAP "tablespace_map"
#define TABLESPACE_MAP_OLD "tablespace_map.old"
#endif /* XLOG_H */
#endif /* XLOG_H */

View File

@@ -319,4 +319,4 @@ extern bool XLogArchiveIsReady(const char *xlog);
extern bool XLogArchiveIsReadyOrDone(const char *xlog);
extern void XLogArchiveCleanup(const char *xlog);
#endif /* XLOG_INTERNAL_H */
#endif /* XLOG_INTERNAL_H */

View File

@@ -99,4 +99,4 @@ typedef uint16 RepOriginId;
#define DEFAULT_SYNC_METHOD SYNC_METHOD_FSYNC
#endif
#endif /* XLOG_DEFS_H */
#endif /* XLOG_DEFS_H */

View File

@@ -29,9 +29,8 @@
/* flags for XLogRegisterBuffer */
#define REGBUF_FORCE_IMAGE 0x01 /* force a full-page image */
#define REGBUF_NO_IMAGE 0x02 /* don't take a full-page image */
#define REGBUF_WILL_INIT (0x04 | 0x02) /* page will be re-initialized
* at replay (implies
* NO_IMAGE) */
#define REGBUF_WILL_INIT (0x04 | 0x02) /* page will be re-initialized at
* replay (implies NO_IMAGE) */
#define REGBUF_STANDARD 0x08 /* page follows "standard" page layout,
* (data between pd_lower and pd_upper
* will be skipped) */
@@ -59,4 +58,4 @@ extern XLogRecPtr XLogSaveBufferForHint(Buffer buffer, bool buffer_std);
extern void InitXLogInsert(void);
#endif /* XLOGINSERT_H */
#endif /* XLOGINSERT_H */

View File

@@ -204,7 +204,7 @@ extern void XLogReaderInvalReadState(XLogReaderState *state);
#ifdef FRONTEND
extern XLogRecPtr XLogFindNextRecord(XLogReaderState *state, XLogRecPtr RecPtr);
#endif /* FRONTEND */
#endif /* FRONTEND */
/* Functions for decoding an XLogRecord */
@@ -233,4 +233,4 @@ extern bool XLogRecGetBlockTag(XLogReaderState *record, uint8 block_id,
RelFileNode *rnode, ForkNumber *forknum,
BlockNumber *blknum);
#endif /* XLOGREADER_H */
#endif /* XLOGREADER_H */

View File

@@ -145,7 +145,7 @@ typedef struct XLogRecordBlockImageHeader
/* Information stored in bimg_info */
#define BKPIMAGE_HAS_HOLE 0x01 /* page image has "hole" */
#define BKPIMAGE_IS_COMPRESSED 0x02 /* page image is compressed */
#define BKPIMAGE_IS_COMPRESSED 0x02 /* page image is compressed */
#define BKPIMAGE_APPLY 0x04 /* page image should be restored during
* replay */
@@ -225,4 +225,4 @@ typedef struct XLogRecordDataHeaderLong
#define XLR_BLOCK_ID_DATA_LONG 254
#define XLR_BLOCK_ID_ORIGIN 253
#endif /* XLOGRECORD_H */
#endif /* XLOGRECORD_H */