1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-24 01:29:19 +03:00

pgindent run for 9.5

This commit is contained in:
Bruce Momjian
2015-05-23 21:35:49 -04:00
parent 225892552b
commit 807b9e0dff
414 changed files with 5810 additions and 5308 deletions

View File

@@ -40,11 +40,11 @@ typedef struct BrinSpecialSpace
* See comments above GinPageOpaqueData.
*/
#define BrinPageType(page) \
(((BrinSpecialSpace *) \
(((BrinSpecialSpace *) \
PageGetSpecialPointer(page))->vector[MAXALIGN(1) / sizeof(uint16) - 1])
#define BrinPageFlags(page) \
(((BrinSpecialSpace *) \
(((BrinSpecialSpace *) \
PageGetSpecialPointer(page))->vector[MAXALIGN(1) / sizeof(uint16) - 2])
/* special space on all BRIN pages stores a "type" identifier */

View File

@@ -17,7 +17,7 @@
#include "utils/guc.h"
extern PGDLLIMPORT bool track_commit_timestamp;
extern PGDLLIMPORT bool track_commit_timestamp;
extern bool check_track_commit_timestamp(bool *newval, void **extra,
GucSource source);
@@ -53,9 +53,9 @@ extern void AdvanceOldestCommitTs(TransactionId oldestXact);
typedef struct xl_commit_ts_set
{
TimestampTz timestamp;
RepOriginId nodeid;
TransactionId mainxid;
TimestampTz timestamp;
RepOriginId nodeid;
TransactionId mainxid;
/* subxact Xids follow */
} xl_commit_ts_set;

View File

@@ -67,7 +67,7 @@ typedef char GinTernaryValue;
/* GUC parameters */
extern PGDLLIMPORT int GinFuzzySearchLimit;
extern int gin_pending_list_limit;
extern int gin_pending_list_limit;
/* ginutil.c */
extern void ginGetStats(Relation index, GinStatsData *stats);

View File

@@ -121,7 +121,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 */
IndexTuple ftup; /* data fetched back from the index, used in
* index-only scans */
} GISTSearchHeapItem;
@@ -166,7 +166,7 @@ typedef struct GISTScanOpaqueData
OffsetNumber nPageData; /* number of valid items in array */
OffsetNumber curPageData; /* next item to return */
MemoryContext pageDataCxt; /* context holding the fetched tuples, for
index-only scans */
* index-only scans */
} GISTScanOpaqueData;
typedef GISTScanOpaqueData *GISTScanOpaque;

View File

@@ -338,7 +338,7 @@ typedef struct HSpool HSpool; /* opaque struct in hashsort.c */
extern HSpool *_h_spoolinit(Relation heap, Relation index, uint32 num_buckets);
extern void _h_spooldestroy(HSpool *hspool);
extern void _h_spool(HSpool *hspool, ItemPointer self,
Datum *values, bool *isnull);
Datum *values, bool *isnull);
extern void _h_indexbuild(HSpool *hspool);
/* hashutil.c */

View File

@@ -118,7 +118,7 @@ extern HeapScanDesc heap_beginscan_sampling(Relation relation,
Snapshot snapshot, int nkeys, ScanKey key,
bool allow_strat, bool allow_pagemode);
extern void heap_setscanlimits(HeapScanDesc scan, BlockNumber startBlk,
BlockNumber endBlk);
BlockNumber endBlk);
extern void heapgetpage(HeapScanDesc scan, BlockNumber page);
extern void heap_rescan(HeapScanDesc scan, ScanKey key);
extern void heap_endscan(HeapScanDesc scan);

View File

@@ -402,7 +402,7 @@ do { \
#define HeapTupleHeaderGetSpeculativeToken(tup) \
( \
AssertMacro(HeapTupleHeaderIsSpeculative(tup)), \
AssertMacro(HeapTupleHeaderIsSpeculative(tup)), \
ItemPointerGetBlockNumber(&(tup)->t_ctid) \
)

View File

@@ -126,7 +126,7 @@ extern void MultiXactAdvanceNextMXact(MultiXactId minMulti,
MultiXactOffset minMultiOffset);
extern void MultiXactAdvanceOldest(MultiXactId oldestMulti, Oid oldestMultiDB);
extern void MultiXactSetSafeTruncate(MultiXactId safeTruncateMulti);
extern int MultiXactMemberFreezeThreshold(void);
extern int MultiXactMemberFreezeThreshold(void);
extern void multixact_twophase_recover(TransactionId xid, uint16 info,
void *recdata, uint32 len);

View File

@@ -21,33 +21,33 @@
#include "storage/shm_toc.h"
#include "utils/elog.h"
typedef void (*parallel_worker_main_type)(dsm_segment *seg, shm_toc *toc);
typedef void (*parallel_worker_main_type) (dsm_segment *seg, shm_toc *toc);
typedef struct ParallelWorkerInfo
{
BackgroundWorkerHandle *bgwhandle;
shm_mq_handle *error_mqh;
int32 pid;
int32 pid;
} ParallelWorkerInfo;
typedef struct ParallelContext
{
dlist_node node;
dlist_node node;
SubTransactionId subid;
int nworkers;
int nworkers;
parallel_worker_main_type entrypoint;
char *library_name;
char *function_name;
char *library_name;
char *function_name;
ErrorContextCallback *error_context_stack;
shm_toc_estimator estimator;
dsm_segment *seg;
void *private_memory;
shm_toc *toc;
void *private_memory;
shm_toc *toc;
ParallelWorkerInfo *worker;
} ParallelContext;
extern bool ParallelMessagePending;
extern int ParallelWorkerNumber;
extern int ParallelWorkerNumber;
#define IsParallelWorker() (ParallelWorkerNumber >= 0)

View File

@@ -38,8 +38,8 @@ typedef struct HeapScanDescData
/* state set up at initscan time */
BlockNumber rs_nblocks; /* total number of blocks in rel */
BlockNumber rs_startblock; /* block # to start at */
BlockNumber rs_initblock; /* block # to consider initial of rel */
BlockNumber rs_numblocks; /* number of blocks to scan */
BlockNumber rs_initblock; /* block # to consider initial of rel */
BlockNumber rs_numblocks; /* number of blocks to scan */
BufferAccessStrategy rs_strategy; /* access strategy for reads */
bool rs_syncscan; /* report location to syncscan logic? */

View File

@@ -72,4 +72,4 @@ typedef uint16 StrategyNumber;
#define RTMaxStrategyNumber 27
#endif /* STRATNUM_H */
#endif /* STRATNUM_H */

View File

@@ -1,7 +1,7 @@
/*-------------------------------------------------------------------------
*
* tablesample.h
* Public header file for TABLESAMPLE clause interface
* Public header file for TABLESAMPLE clause interface
*
*
* Portions Copyright (c) 1996-2015, PostgreSQL Global Development Group
@@ -17,30 +17,31 @@
#include "access/relscan.h"
#include "executor/executor.h"
typedef struct TableSampleDesc {
HeapScanDesc heapScan;
TupleDesc tupDesc; /* Mostly useful for tsmexaminetuple */
typedef struct TableSampleDesc
{
HeapScanDesc heapScan;
TupleDesc tupDesc; /* Mostly useful for tsmexaminetuple */
void *tsmdata; /* private method data */
void *tsmdata; /* private method data */
/* These point to he function of the TABLESAMPLE Method. */
FmgrInfo tsminit;
FmgrInfo tsmnextblock;
FmgrInfo tsmnexttuple;
FmgrInfo tsmexaminetuple;
FmgrInfo tsmreset;
FmgrInfo tsmend;
FmgrInfo tsminit;
FmgrInfo tsmnextblock;
FmgrInfo tsmnexttuple;
FmgrInfo tsmexaminetuple;
FmgrInfo tsmreset;
FmgrInfo tsmend;
} TableSampleDesc;
extern TableSampleDesc *tablesample_init(SampleScanState *scanstate,
TableSampleClause *tablesample);
TableSampleClause *tablesample);
extern HeapTuple tablesample_getnext(TableSampleDesc *desc);
extern void tablesample_reset(TableSampleDesc *desc);
extern void tablesample_end(TableSampleDesc *desc);
extern HeapTuple tablesample_source_getnext(TableSampleDesc *desc);
extern HeapTuple tablesample_source_gettup(TableSampleDesc *desc, ItemPointer tid,
bool *visible);
bool *visible);
extern Datum tsm_system_init(PG_FUNCTION_ARGS);
extern Datum tsm_system_nextblock(PG_FUNCTION_ARGS);

View File

@@ -204,7 +204,7 @@ typedef struct xl_xact_subxacts
typedef struct xl_xact_relfilenodes
{
int nrels; /* number of subtransaction XIDs */
int nrels; /* number of subtransaction XIDs */
RelFileNode xnodes[FLEXIBLE_ARRAY_MEMBER];
} xl_xact_relfilenodes;
#define MinSizeOfXactRelfilenodes offsetof(xl_xact_relfilenodes, xnodes)
@@ -262,23 +262,23 @@ typedef struct xl_xact_abort
*/
typedef struct xl_xact_parsed_commit
{
TimestampTz xact_time;
TimestampTz xact_time;
uint32 xinfo;
uint32 xinfo;
Oid dbId; /* MyDatabaseId */
Oid tsId; /* MyDatabaseTableSpace */
Oid dbId; /* MyDatabaseId */
Oid tsId; /* MyDatabaseTableSpace */
int nsubxacts;
TransactionId *subxacts;
int nsubxacts;
TransactionId *subxacts;
int nrels;
RelFileNode *xnodes;
int nrels;
RelFileNode *xnodes;
int nmsgs;
int nmsgs;
SharedInvalidationMessage *msgs;
TransactionId twophase_xid; /* only for 2PC */
TransactionId twophase_xid; /* only for 2PC */
XLogRecPtr origin_lsn;
TimestampTz origin_timestamp;
@@ -286,16 +286,16 @@ typedef struct xl_xact_parsed_commit
typedef struct xl_xact_parsed_abort
{
TimestampTz xact_time;
uint32 xinfo;
TimestampTz xact_time;
uint32 xinfo;
int nsubxacts;
TransactionId *subxacts;
int nsubxacts;
TransactionId *subxacts;
int nrels;
RelFileNode *xnodes;
int nrels;
RelFileNode *xnodes;
TransactionId twophase_xid; /* only for 2PC */
TransactionId twophase_xid; /* only for 2PC */
} xl_xact_parsed_abort;
@@ -356,16 +356,16 @@ extern void UnregisterSubXactCallback(SubXactCallback callback, void *arg);
extern int xactGetCommittedChildren(TransactionId **ptr);
extern XLogRecPtr XactLogCommitRecord(TimestampTz commit_time,
int nsubxacts, TransactionId *subxacts,
int nrels, RelFileNode *rels,
int nmsgs, SharedInvalidationMessage *msgs,
bool relcacheInval, bool forceSync,
TransactionId twophase_xid);
int nsubxacts, TransactionId *subxacts,
int nrels, RelFileNode *rels,
int nmsgs, SharedInvalidationMessage *msgs,
bool relcacheInval, bool forceSync,
TransactionId twophase_xid);
extern XLogRecPtr XactLogAbortRecord(TimestampTz abort_time,
int nsubxacts, TransactionId *subxacts,
int nrels, RelFileNode *rels,
TransactionId twophase_xid);
int nsubxacts, TransactionId *subxacts,
int nrels, RelFileNode *rels,
TransactionId twophase_xid);
extern void xact_redo(XLogReaderState *record);
/* xactdesc.c */

View File

@@ -110,9 +110,9 @@ extern int CheckPointSegments;
/* Archive modes */
typedef enum ArchiveMode
{
ARCHIVE_MODE_OFF = 0, /* disabled */
ARCHIVE_MODE_ON, /* enabled while server is running normally */
ARCHIVE_MODE_ALWAYS /* enabled always (even during recovery) */
ARCHIVE_MODE_OFF = 0, /* disabled */
ARCHIVE_MODE_ON, /* enabled while server is running normally */
ARCHIVE_MODE_ALWAYS /* enabled always (even during recovery) */
} ArchiveMode;
extern int XLogArchiveMode;

View File

@@ -29,13 +29,14 @@
/* 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_STANDARD 0x08 /* page follows "standard" page layout,
* (data between pd_lower and pd_upper
* will be skipped) */
#define REGBUF_KEEP_DATA 0x10 /* include data even if a full-page image
* is taken */
#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) */
#define REGBUF_KEEP_DATA 0x10/* include data even if a full-page image is
* taken */
/* prototypes for public functions in xloginsert.c: */
extern void XLogBeginInsert(void);

View File

@@ -127,7 +127,7 @@ struct XLogReaderState
uint32 main_data_len; /* main data portion's length */
uint32 main_data_bufsz; /* allocated size of the buffer */
RepOriginId record_origin;
RepOriginId record_origin;
/* information about blocks referenced by the record. */
DecodedBkpBlock blocks[XLR_MAX_BLOCK_ID + 1];

View File

@@ -121,13 +121,13 @@ typedef struct XLogRecordBlockHeader
*/
typedef struct XLogRecordBlockImageHeader
{
uint16 length; /* number of page image bytes */
uint16 hole_offset; /* number of bytes before "hole" */
uint8 bimg_info; /* flag bits, see below */
uint16 length; /* number of page image bytes */
uint16 hole_offset; /* number of bytes before "hole" */
uint8 bimg_info; /* flag bits, see below */
/*
* If BKPIMAGE_HAS_HOLE and BKPIMAGE_IS_COMPRESSED,
* an XLogRecordBlockCompressHeader struct follows.
* If BKPIMAGE_HAS_HOLE and BKPIMAGE_IS_COMPRESSED, an
* XLogRecordBlockCompressHeader struct follows.
*/
} XLogRecordBlockImageHeader;
@@ -136,7 +136,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 */
/*
* Extra header information used when page image has "hole" and
@@ -144,7 +144,7 @@ typedef struct XLogRecordBlockImageHeader
*/
typedef struct XLogRecordBlockCompressHeader
{
uint16 hole_length; /* number of bytes in "hole" */
uint16 hole_length; /* number of bytes in "hole" */
} XLogRecordBlockCompressHeader;
#define SizeOfXLogRecordBlockCompressHeader \
@@ -185,7 +185,7 @@ typedef struct XLogRecordDataHeaderShort
{
uint8 id; /* XLR_BLOCK_ID_DATA_SHORT */
uint8 data_length; /* number of payload bytes */
} XLogRecordDataHeaderShort;
} XLogRecordDataHeaderShort;
#define SizeOfXLogRecordDataHeaderShort (sizeof(uint8) * 2)
@@ -193,7 +193,7 @@ typedef struct XLogRecordDataHeaderLong
{
uint8 id; /* XLR_BLOCK_ID_DATA_LONG */
/* followed by uint32 data_length, unaligned */
} XLogRecordDataHeaderLong;
} XLogRecordDataHeaderLong;
#define SizeOfXLogRecordDataHeaderLong (sizeof(uint8) + sizeof(uint32))

View File

@@ -26,11 +26,11 @@ extern void XLogTruncateRelation(RelFileNode rnode, ForkNumber forkNum,
/* Result codes for XLogReadBufferForRedo[Extended] */
typedef enum
{
BLK_NEEDS_REDO, /* changes from WAL record need to be applied */
BLK_DONE, /* block is already up-to-date */
BLK_RESTORED, /* block was restored from a full-page image */
BLK_NOTFOUND /* block was not found (and hence does not need to be
* replayed) */
BLK_NEEDS_REDO, /* changes from WAL record need to be applied */
BLK_DONE, /* block is already up-to-date */
BLK_RESTORED, /* block was restored from a full-page image */
BLK_NOTFOUND /* block was not found (and hence does not
* need to be replayed) */
} XLogRedoAction;
extern XLogRedoAction XLogReadBufferForRedo(XLogReaderState *record,