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

Post-PG 10 beta1 pgindent run

perltidy run not included.
This commit is contained in:
Bruce Momjian
2017-05-17 16:31:56 -04:00
parent 8a94332478
commit a6fd7b7a5f
310 changed files with 3338 additions and 3171 deletions

View File

@@ -31,8 +31,8 @@ typedef struct BrinOptions
*/
typedef struct BrinStatsData
{
BlockNumber pagesPerRange;
BlockNumber revmapNumPages;
BlockNumber pagesPerRange;
BlockNumber revmapNumPages;
} BrinStatsData;

View File

@@ -39,9 +39,9 @@ typedef struct BrinMemTuple
BlockNumber bt_blkno; /* heap blkno that the tuple is for */
MemoryContext bt_context; /* memcxt holding the bt_columns values */
/* output arrays for brin_deform_tuple: */
Datum *bt_values; /* values array */
bool *bt_allnulls; /* allnulls array */
bool *bt_hasnulls; /* hasnulls array */
Datum *bt_values; /* values array */
bool *bt_allnulls; /* allnulls array */
bool *bt_hasnulls; /* hasnulls array */
/* not an output array, but must be last */
BrinValues bt_columns[FLEXIBLE_ARRAY_MEMBER];
} BrinMemTuple;

View File

@@ -132,7 +132,7 @@ typedef struct xl_brin_revmap_extend
*/
typedef struct xl_brin_desummarize
{
BlockNumber pagesPerRange;
BlockNumber pagesPerRange;
/* page number location to set to invalid */
BlockNumber heapBlk;
/* offset of item to delete in regular index page */

View File

@@ -30,9 +30,9 @@ typedef int XidStatus;
typedef struct xl_clog_truncate
{
int pageno;
int pageno;
TransactionId oldestXact;
Oid oldestXactDb;
Oid oldestXactDb;
} xl_clog_truncate;
extern void TransactionIdSetTreeStatus(TransactionId xid, int nsubxids,

View File

@@ -57,7 +57,7 @@ typedef uint32 Bucket;
#define LH_BUCKET_BEING_POPULATED (1 << 4)
#define LH_BUCKET_BEING_SPLIT (1 << 5)
#define LH_BUCKET_NEEDS_SPLIT_CLEANUP (1 << 6)
#define LH_PAGE_HAS_DEAD_TUPLES (1 << 7)
#define LH_PAGE_HAS_DEAD_TUPLES (1 << 7)
#define LH_PAGE_TYPE \
(LH_OVERFLOW_PAGE | LH_BUCKET_PAGE | LH_BITMAP_PAGE | LH_META_PAGE)
@@ -97,7 +97,7 @@ typedef HashPageOpaqueData *HashPageOpaque;
*/
#define HASHO_PAGE_ID 0xFF80
typedef struct HashScanPosItem /* what we remember about each match */
typedef struct HashScanPosItem /* what we remember about each match */
{
ItemPointerData heapTid; /* TID of referenced heap item */
OffsetNumber indexOffset; /* index item's location within page */
@@ -145,8 +145,9 @@ 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 */
int numKilled; /* number of currently stored items */
HashScanPosItem *killedItems; /* tids and offset numbers of killed
* items */
int numKilled; /* number of currently stored items */
} HashScanOpaqueData;
typedef HashScanOpaqueData *HashScanOpaque;
@@ -358,7 +359,7 @@ extern Buffer _hash_getbucketbuf_from_hashkey(Relation rel, uint32 hashkey,
HashMetaPage *cachedmetap);
extern Buffer _hash_getinitbuf(Relation rel, BlockNumber blkno);
extern void _hash_initbuf(Buffer buf, uint32 max_bucket, uint32 num_bucket,
uint32 flag, bool initpage);
uint32 flag, bool initpage);
extern Buffer _hash_getnewbuf(Relation rel, BlockNumber blkno,
ForkNumber forkNum);
extern Buffer _hash_getbuf_with_strategy(Relation rel, BlockNumber blkno,

View File

@@ -44,7 +44,8 @@
#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.
@@ -76,7 +77,7 @@ typedef struct xl_hash_createidx
typedef struct xl_hash_insert
{
OffsetNumber offnum;
} xl_hash_insert;
} xl_hash_insert;
#define SizeOfHashInsert (offsetof(xl_hash_insert, offnum) + sizeof(OffsetNumber))
@@ -95,7 +96,7 @@ typedef struct xl_hash_add_ovfl_page
{
uint16 bmsize;
bool bmpage_found;
} xl_hash_add_ovfl_page;
} xl_hash_add_ovfl_page;
#define SizeOfHashAddOvflPage \
(offsetof(xl_hash_add_ovfl_page, bmpage_found) + sizeof(bool))
@@ -115,7 +116,7 @@ typedef struct xl_hash_split_allocate_page
uint16 old_bucket_flag;
uint16 new_bucket_flag;
uint8 flags;
} xl_hash_split_allocate_page;
} xl_hash_split_allocate_page;
#define SizeOfHashSplitAllocPage \
(offsetof(xl_hash_split_allocate_page, flags) + sizeof(uint8))
@@ -132,7 +133,7 @@ typedef struct xl_hash_split_complete
{
uint16 old_bucket_flag;
uint16 new_bucket_flag;
} xl_hash_split_complete;
} xl_hash_split_complete;
#define SizeOfHashSplitComplete \
(offsetof(xl_hash_split_complete, new_bucket_flag) + sizeof(uint16))
@@ -153,7 +154,7 @@ typedef struct xl_hash_move_page_contents
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;
} xl_hash_move_page_contents;
#define SizeOfHashMovePageContents \
(offsetof(xl_hash_move_page_contents, is_prim_bucket_same_wrt) + sizeof(bool))
@@ -182,7 +183,7 @@ typedef struct xl_hash_squeeze_page
* tuples are moved is the
* page previous to the freed
* overflow page */
} xl_hash_squeeze_page;
} xl_hash_squeeze_page;
#define SizeOfHashSqueezePage \
(offsetof(xl_hash_squeeze_page, is_prev_bucket_same_wrt) + sizeof(bool))
@@ -201,7 +202,7 @@ typedef struct xl_hash_delete
* LH_PAGE_HAS_DEAD_TUPLES flag */
bool is_primary_bucket_page; /* TRUE if the operation is for
* primary bucket page */
} xl_hash_delete;
} xl_hash_delete;
#define SizeOfHashDelete (offsetof(xl_hash_delete, is_primary_bucket_page) + sizeof(bool))
@@ -215,7 +216,7 @@ typedef struct xl_hash_delete
typedef struct xl_hash_update_meta_page
{
double ntuples;
} xl_hash_update_meta_page;
} xl_hash_update_meta_page;
#define SizeOfHashUpdateMetaPage \
(offsetof(xl_hash_update_meta_page, ntuples) + sizeof(double))
@@ -232,7 +233,7 @@ typedef struct xl_hash_init_meta_page
double num_tuples;
RegProcedure procid;
uint16 ffactor;
} xl_hash_init_meta_page;
} xl_hash_init_meta_page;
#define SizeOfHashInitMetaPage \
(offsetof(xl_hash_init_meta_page, ffactor) + sizeof(uint16))
@@ -248,7 +249,7 @@ typedef struct xl_hash_init_meta_page
typedef struct xl_hash_init_bitmap_page
{
uint16 bmsize;
} xl_hash_init_bitmap_page;
} xl_hash_init_bitmap_page;
#define SizeOfHashInitBitmapPage \
(offsetof(xl_hash_init_bitmap_page, bmsize) + sizeof(uint16))
@@ -264,13 +265,13 @@ typedef struct xl_hash_init_bitmap_page
*/
typedef struct xl_hash_vacuum_one_page
{
RelFileNode hnode;
int ntuples;
RelFileNode hnode;
int ntuples;
/* TARGET OFFSET NUMBERS FOLLOW AT THE END */
} xl_hash_vacuum_one_page;
} xl_hash_vacuum_one_page;
#define SizeOfHashVacuumOnePage \
#define SizeOfHashVacuumOnePage \
(offsetof(xl_hash_vacuum_one_page, ntuples) + sizeof(int))
extern void hash_redo(XLogReaderState *record);

View File

@@ -146,7 +146,7 @@ typedef struct ParallelIndexScanDescData
Oid ps_indexid;
Size ps_offset; /* Offset in bytes of am specific structure */
char ps_snapshot_data[FLEXIBLE_ARRAY_MEMBER];
} ParallelIndexScanDescData;
} ParallelIndexScanDescData;
/* Struct for heap-or-index scans of system tables */
typedef struct SysScanDescData

View File

@@ -54,7 +54,7 @@ extern void CheckPointTwoPhase(XLogRecPtr redo_horizon);
extern void FinishPreparedTransaction(const char *gid, bool isCommit);
extern void PrepareRedoAdd(char *buf, XLogRecPtr start_lsn,
XLogRecPtr end_lsn);
XLogRecPtr end_lsn);
extern void PrepareRedoRemove(TransactionId xid, bool giveWarning);
extern void restoreTwoPhaseData(void);
#endif /* TWOPHASE_H */

View File

@@ -78,7 +78,7 @@ extern int synchronous_commit;
* globally accessible, so can be set from anywhere in the code which requires
* recording flags.
*/
extern int MyXactFlags;
extern int MyXactFlags;
/*
* XACT_FLAGS_ACCESSEDTEMPREL - set when a temporary relation is accessed. We

View File

@@ -221,8 +221,8 @@ extern CheckpointStatsData CheckpointStats;
struct XLogRecData;
extern XLogRecPtr XLogInsertRecord(struct XLogRecData *rdata,
XLogRecPtr fpw_lsn,
uint8 flags);
XLogRecPtr fpw_lsn,
uint8 flags);
extern void XLogFlush(XLogRecPtr RecPtr);
extern bool XLogBackgroundFlush(void);
extern bool XLogNeedsFlush(XLogRecPtr RecPtr);

View File

@@ -163,15 +163,17 @@ struct XLogReaderState
XLogRecPtr currRecPtr;
/* timeline to read it from, 0 if a lookup is required */
TimeLineID currTLI;
/*
* Safe point to read to in currTLI if current TLI is historical
* (tliSwitchPoint) or InvalidXLogRecPtr if on current timeline.
*
* Actually set to the start of the segment containing the timeline
* switch that ends currTLI's validity, not the LSN of the switch
* its self, since we can't assume the old segment will be present.
* Actually set to the start of the segment containing the timeline switch
* that ends currTLI's validity, not the LSN of the switch its self, since
* we can't assume the old segment will be present.
*/
XLogRecPtr currTLIValidUntil;
/*
* If currTLI is not the most recent known timeline, the next timeline to
* read from when currTLIValidUntil is reached.

View File

@@ -53,6 +53,6 @@ extern int read_local_xlog_page(XLogReaderState *state,
TimeLineID *pageTLI);
extern void XLogReadDetermineTimeline(XLogReaderState *state,
XLogRecPtr wantPage, uint32 wantLength);
XLogRecPtr wantPage, uint32 wantLength);
#endif