diff options
author | Peter Geoghegan | 2022-09-20 02:18:36 +0000 |
---|---|---|
committer | Peter Geoghegan | 2022-09-20 02:18:36 +0000 |
commit | bfcf1b34805f70df48eedeec237230d0cc1154a6 (patch) | |
tree | baf824c317ecf02c49d758e75e72d69c5b6a4ec6 /src/include/access | |
parent | c47885bd8b6997ccb0cc1997f61f6f98a79ce32a (diff) |
Harmonize parameter names in storage and AM code.
Make sure that function declarations use names that exactly match the
corresponding names from function definitions in storage, catalog,
access method, executor, and logical replication code, as well as in
miscellaneous utility/library code.
Like other recent commits that cleaned up function parameter names, this
commit was written with help from clang-tidy. Later commits will do the
same for other parts of the codebase.
Author: Peter Geoghegan <[email protected]>
Reviewed-By: David Rowley <[email protected]>
Discussion: https://postgr.es/m/CAH2-WznJt9CMM9KJTMjJh_zbL5hD9oX44qdJ4aqZtjFi-zA3Tg@mail.gmail.com
Diffstat (limited to 'src/include/access')
-rw-r--r-- | src/include/access/genam.h | 9 | ||||
-rw-r--r-- | src/include/access/generic_xlog.h | 2 | ||||
-rw-r--r-- | src/include/access/gin_private.h | 12 | ||||
-rw-r--r-- | src/include/access/gist_private.h | 18 | ||||
-rw-r--r-- | src/include/access/reloptions.h | 12 | ||||
-rw-r--r-- | src/include/access/tupconvert.h | 2 | ||||
-rw-r--r-- | src/include/access/tupdesc.h | 2 | ||||
-rw-r--r-- | src/include/access/twophase.h | 2 | ||||
-rw-r--r-- | src/include/access/xact.h | 8 | ||||
-rw-r--r-- | src/include/access/xlog.h | 8 | ||||
-rw-r--r-- | src/include/access/xloginsert.h | 8 | ||||
-rw-r--r-- | src/include/access/xlogreader.h | 2 | ||||
-rw-r--r-- | src/include/access/xlogrecovery.h | 4 | ||||
-rw-r--r-- | src/include/access/xlogutils.h | 4 |
14 files changed, 49 insertions, 44 deletions
diff --git a/src/include/access/genam.h b/src/include/access/genam.h index 134b20f1e64..e1c4fdbd030 100644 --- a/src/include/access/genam.h +++ b/src/include/access/genam.h @@ -161,9 +161,10 @@ extern void index_rescan(IndexScanDesc scan, extern void index_endscan(IndexScanDesc scan); extern void index_markpos(IndexScanDesc scan); extern void index_restrpos(IndexScanDesc scan); -extern Size index_parallelscan_estimate(Relation indexrel, Snapshot snapshot); -extern void index_parallelscan_initialize(Relation heaprel, Relation indexrel, - Snapshot snapshot, ParallelIndexScanDesc target); +extern Size index_parallelscan_estimate(Relation indexRelation, Snapshot snapshot); +extern void index_parallelscan_initialize(Relation heapRelation, + Relation indexRelation, Snapshot snapshot, + ParallelIndexScanDesc target); extern void index_parallelrescan(IndexScanDesc scan); extern IndexScanDesc index_beginscan_parallel(Relation heaprel, Relation indexrel, int nkeys, int norderbys, @@ -191,7 +192,7 @@ extern void index_store_float8_orderby_distances(IndexScanDesc scan, Oid *orderByTypes, IndexOrderByDistance *distances, bool recheckOrderBy); -extern bytea *index_opclass_options(Relation relation, AttrNumber attnum, +extern bytea *index_opclass_options(Relation indrel, AttrNumber attnum, Datum attoptions, bool validate); diff --git a/src/include/access/generic_xlog.h b/src/include/access/generic_xlog.h index c8363a47666..da456564272 100644 --- a/src/include/access/generic_xlog.h +++ b/src/include/access/generic_xlog.h @@ -40,6 +40,6 @@ extern void GenericXLogAbort(GenericXLogState *state); extern void generic_redo(XLogReaderState *record); extern const char *generic_identify(uint8 info); extern void generic_desc(StringInfo buf, XLogReaderState *record); -extern void generic_mask(char *pagedata, BlockNumber blkno); +extern void generic_mask(char *page, BlockNumber blkno); #endif /* GENERIC_XLOG_H */ diff --git a/src/include/access/gin_private.h b/src/include/access/gin_private.h index 2935d2f353c..145ec7743cc 100644 --- a/src/include/access/gin_private.h +++ b/src/include/access/gin_private.h @@ -240,7 +240,8 @@ extern void ginDataFillRoot(GinBtree btree, Page root, BlockNumber lblkno, Page */ typedef struct GinVacuumState GinVacuumState; -extern void ginVacuumPostingTreeLeaf(Relation rel, Buffer buf, GinVacuumState *gvs); +extern void ginVacuumPostingTreeLeaf(Relation indexrel, Buffer buffer, + GinVacuumState *gvs); /* ginscan.c */ @@ -385,7 +386,7 @@ typedef GinScanOpaqueData *GinScanOpaque; extern IndexScanDesc ginbeginscan(Relation rel, int nkeys, int norderbys); extern void ginendscan(IndexScanDesc scan); -extern void ginrescan(IndexScanDesc scan, ScanKey key, int nscankeys, +extern void ginrescan(IndexScanDesc scan, ScanKey scankey, int nscankeys, ScanKey orderbys, int norderbys); extern void ginNewScanKey(IndexScanDesc scan); extern void ginFreeScanKeys(GinScanOpaque so); @@ -469,10 +470,11 @@ extern void ginInsertCleanup(GinState *ginstate, bool full_clean, extern GinPostingList *ginCompressPostingList(const ItemPointer ipd, int nipd, int maxsize, int *nwritten); -extern int ginPostingListDecodeAllSegmentsToTbm(GinPostingList *ptr, int totalsize, TIDBitmap *tbm); +extern int ginPostingListDecodeAllSegmentsToTbm(GinPostingList *ptr, int len, TIDBitmap *tbm); -extern ItemPointer ginPostingListDecodeAllSegments(GinPostingList *ptr, int len, int *ndecoded); -extern ItemPointer ginPostingListDecode(GinPostingList *ptr, int *ndecoded); +extern ItemPointer ginPostingListDecodeAllSegments(GinPostingList *segment, int len, + int *ndecoded_out); +extern ItemPointer ginPostingListDecode(GinPostingList *plist, int *ndecoded_out); extern ItemPointer ginMergeItemPointers(ItemPointerData *a, uint32 na, ItemPointerData *b, uint32 nb, int *nmerged); diff --git a/src/include/access/gist_private.h b/src/include/access/gist_private.h index 240131ef71d..093bf23443c 100644 --- a/src/include/access/gist_private.h +++ b/src/include/access/gist_private.h @@ -445,16 +445,16 @@ extern void gistXLogPageReuse(Relation rel, BlockNumber blkno, extern XLogRecPtr gistXLogUpdate(Buffer buffer, OffsetNumber *todelete, int ntodelete, - IndexTuple *itup, int ntup, - Buffer leftchild); + IndexTuple *itup, int ituplen, + Buffer leftchildbuf); extern XLogRecPtr gistXLogDelete(Buffer buffer, OffsetNumber *todelete, int ntodelete, TransactionId latestRemovedXid); extern XLogRecPtr gistXLogSplit(bool page_is_leaf, SplitedPageLayout *dist, - BlockNumber origrlink, GistNSN oldnsn, - Buffer leftchild, bool markfollowright); + BlockNumber origrlink, GistNSN orignsn, + Buffer leftchildbuf, bool markfollowright); extern XLogRecPtr gistXLogAssignLSN(void); @@ -516,8 +516,8 @@ extern void gistdentryinit(GISTSTATE *giststate, int nkey, GISTENTRY *e, bool l, bool isNull); extern float gistpenalty(GISTSTATE *giststate, int attno, - GISTENTRY *key1, bool isNull1, - GISTENTRY *key2, bool isNull2); + GISTENTRY *orig, bool isNullOrig, + GISTENTRY *add, bool isNullAdd); extern void gistMakeUnionItVec(GISTSTATE *giststate, IndexTuple *itvec, int len, Datum *attr, bool *isnull); extern bool gistKeyIsEQ(GISTSTATE *giststate, int attno, Datum a, Datum b); @@ -556,11 +556,11 @@ extern GISTBuildBuffers *gistInitBuildBuffers(int pagesPerBuffer, int levelStep, int maxLevel); extern GISTNodeBuffer *gistGetNodeBuffer(GISTBuildBuffers *gfbb, GISTSTATE *giststate, - BlockNumber blkno, int level); + BlockNumber nodeBlocknum, int level); extern void gistPushItupToNodeBuffer(GISTBuildBuffers *gfbb, - GISTNodeBuffer *nodeBuffer, IndexTuple item); + GISTNodeBuffer *nodeBuffer, IndexTuple itup); extern bool gistPopItupFromNodeBuffer(GISTBuildBuffers *gfbb, - GISTNodeBuffer *nodeBuffer, IndexTuple *item); + GISTNodeBuffer *nodeBuffer, IndexTuple *itup); extern void gistFreeBuildBuffers(GISTBuildBuffers *gfbb); extern void gistRelocateBuildBuffersOnSplit(GISTBuildBuffers *gfbb, GISTSTATE *giststate, Relation r, diff --git a/src/include/access/reloptions.h b/src/include/access/reloptions.h index f7405133032..21bde78ed09 100644 --- a/src/include/access/reloptions.h +++ b/src/include/access/reloptions.h @@ -195,16 +195,16 @@ extern void add_string_reloption(bits32 kinds, const char *name, const char *des const char *default_val, validate_string_relopt validator, LOCKMODE lockmode); -extern void init_local_reloptions(local_relopts *opts, Size relopt_struct_size); -extern void register_reloptions_validator(local_relopts *opts, +extern void init_local_reloptions(local_relopts *relopts, Size relopt_struct_size); +extern void register_reloptions_validator(local_relopts *relopts, relopts_validator validator); -extern void add_local_bool_reloption(local_relopts *opts, const char *name, +extern void add_local_bool_reloption(local_relopts *relopts, const char *name, const char *desc, bool default_val, int offset); -extern void add_local_int_reloption(local_relopts *opts, const char *name, +extern void add_local_int_reloption(local_relopts *relopts, const char *name, const char *desc, int default_val, int min_val, int max_val, int offset); -extern void add_local_real_reloption(local_relopts *opts, const char *name, +extern void add_local_real_reloption(local_relopts *relopts, const char *name, const char *desc, double default_val, double min_val, double max_val, int offset); @@ -213,7 +213,7 @@ extern void add_local_enum_reloption(local_relopts *relopts, relopt_enum_elt_def *members, int default_val, const char *detailmsg, int offset); -extern void add_local_string_reloption(local_relopts *opts, const char *name, +extern void add_local_string_reloption(local_relopts *relopts, const char *name, const char *desc, const char *default_val, validate_string_relopt validator, diff --git a/src/include/access/tupconvert.h b/src/include/access/tupconvert.h index f5a5fd826a8..a37dafc666d 100644 --- a/src/include/access/tupconvert.h +++ b/src/include/access/tupconvert.h @@ -44,7 +44,7 @@ extern HeapTuple execute_attr_map_tuple(HeapTuple tuple, TupleConversionMap *map extern TupleTableSlot *execute_attr_map_slot(AttrMap *attrMap, TupleTableSlot *in_slot, TupleTableSlot *out_slot); -extern Bitmapset *execute_attr_map_cols(AttrMap *attrMap, Bitmapset *inbitmap); +extern Bitmapset *execute_attr_map_cols(AttrMap *attrMap, Bitmapset *in_cols); extern void free_conversion_map(TupleConversionMap *map); diff --git a/src/include/access/tupdesc.h b/src/include/access/tupdesc.h index 28dd6de18b2..cf27356ba9a 100644 --- a/src/include/access/tupdesc.h +++ b/src/include/access/tupdesc.h @@ -127,7 +127,7 @@ extern void DecrTupleDescRefCount(TupleDesc tupdesc); extern bool equalTupleDescs(TupleDesc tupdesc1, TupleDesc tupdesc2); -extern uint32 hashTupleDesc(TupleDesc tupdesc); +extern uint32 hashTupleDesc(TupleDesc desc); extern void TupleDescInitEntry(TupleDesc desc, AttrNumber attributeNumber, diff --git a/src/include/access/twophase.h b/src/include/access/twophase.h index 5d6544e2670..f94fded1005 100644 --- a/src/include/access/twophase.h +++ b/src/include/access/twophase.h @@ -60,6 +60,6 @@ extern void PrepareRedoAdd(char *buf, XLogRecPtr start_lsn, XLogRecPtr end_lsn, RepOriginId origin_id); extern void PrepareRedoRemove(TransactionId xid, bool giveWarning); extern void restoreTwoPhaseData(void); -extern bool LookupGXact(const char *gid, XLogRecPtr prepare_at_lsn, +extern bool LookupGXact(const char *gid, XLogRecPtr prepare_end_lsn, TimestampTz origin_prepare_timestamp); #endif /* TWOPHASE_H */ diff --git a/src/include/access/xact.h b/src/include/access/xact.h index 300baae1209..c604ee11f85 100644 --- a/src/include/access/xact.h +++ b/src/include/access/xact.h @@ -490,8 +490,8 @@ extern int xactGetCommittedChildren(TransactionId **ptr); extern XLogRecPtr XactLogCommitRecord(TimestampTz commit_time, int nsubxacts, TransactionId *subxacts, int nrels, RelFileLocator *rels, - int nstats, - xl_xact_stats_item *stats, + int ndroppedstats, + xl_xact_stats_item *droppedstats, int nmsgs, SharedInvalidationMessage *msgs, bool relcacheInval, int xactflags, @@ -501,8 +501,8 @@ extern XLogRecPtr XactLogCommitRecord(TimestampTz commit_time, extern XLogRecPtr XactLogAbortRecord(TimestampTz abort_time, int nsubxacts, TransactionId *subxacts, int nrels, RelFileLocator *rels, - int nstats, - xl_xact_stats_item *stats, + int ndroppedstats, + xl_xact_stats_item *droppedstats, int xactflags, TransactionId twophase_xid, const char *twophase_gid); extern void xact_redo(XLogReaderState *record); diff --git a/src/include/access/xlog.h b/src/include/access/xlog.h index 9ebd321ba76..3dbfa6b5932 100644 --- a/src/include/access/xlog.h +++ b/src/include/access/xlog.h @@ -197,15 +197,15 @@ extern XLogRecPtr XLogInsertRecord(struct XLogRecData *rdata, uint8 flags, int num_fpi, bool topxid_included); -extern void XLogFlush(XLogRecPtr RecPtr); +extern void XLogFlush(XLogRecPtr record); extern bool XLogBackgroundFlush(void); -extern bool XLogNeedsFlush(XLogRecPtr RecPtr); -extern int XLogFileInit(XLogSegNo segno, TimeLineID tli); +extern bool XLogNeedsFlush(XLogRecPtr record); +extern int XLogFileInit(XLogSegNo logsegno, TimeLineID logtli); extern int XLogFileOpen(XLogSegNo segno, TimeLineID tli); extern void CheckXLogRemoved(XLogSegNo segno, TimeLineID tli); extern XLogSegNo XLogGetLastRemovedSegno(void); -extern void XLogSetAsyncXactLSN(XLogRecPtr record); +extern void XLogSetAsyncXactLSN(XLogRecPtr asyncXactLSN); extern void XLogSetReplicationSlotMinimumLSN(XLogRecPtr lsn); extern void xlog_redo(XLogReaderState *record); diff --git a/src/include/access/xloginsert.h b/src/include/access/xloginsert.h index aed4643d1c5..001ff2f5210 100644 --- a/src/include/access/xloginsert.h +++ b/src/include/access/xloginsert.h @@ -52,12 +52,12 @@ extern void XLogRegisterBufData(uint8 block_id, char *data, uint32 len); extern void XLogResetInsertion(void); extern bool XLogCheckBufferNeedsBackup(Buffer buffer); -extern XLogRecPtr log_newpage(RelFileLocator *rlocator, ForkNumber forkNum, - BlockNumber blk, char *page, bool page_std); -extern void log_newpages(RelFileLocator *rlocator, ForkNumber forkNum, int num_pages, +extern XLogRecPtr log_newpage(RelFileLocator *rlocator, ForkNumber forknum, + BlockNumber blkno, char *page, bool page_std); +extern void log_newpages(RelFileLocator *rlocator, ForkNumber forknum, int num_pages, BlockNumber *blknos, char **pages, bool page_std); extern XLogRecPtr log_newpage_buffer(Buffer buffer, bool page_std); -extern void log_newpage_range(Relation rel, ForkNumber forkNum, +extern void log_newpage_range(Relation rel, ForkNumber forknum, BlockNumber startblk, BlockNumber endblk, bool page_std); extern XLogRecPtr XLogSaveBufferForHint(Buffer buffer, bool buffer_std); diff --git a/src/include/access/xlogreader.h b/src/include/access/xlogreader.h index 6afec33d418..6dcde2523a7 100644 --- a/src/include/access/xlogreader.h +++ b/src/include/access/xlogreader.h @@ -400,7 +400,7 @@ extern bool DecodeXLogRecord(XLogReaderState *state, DecodedXLogRecord *decoded, XLogRecord *record, XLogRecPtr lsn, - char **errmsg); + char **errormsg); /* * Macros that provide access to parts of the record most recently returned by diff --git a/src/include/access/xlogrecovery.h b/src/include/access/xlogrecovery.h index 0aa85d90e89..0e3e246bd2c 100644 --- a/src/include/access/xlogrecovery.h +++ b/src/include/access/xlogrecovery.h @@ -80,7 +80,9 @@ extern PGDLLIMPORT bool StandbyMode; extern Size XLogRecoveryShmemSize(void); extern void XLogRecoveryShmemInit(void); -extern void InitWalRecovery(ControlFileData *ControlFile, bool *wasShutdownPtr, bool *haveBackupLabel, bool *haveTblspcMap); +extern void InitWalRecovery(ControlFileData *ControlFile, + bool *wasShutdown_ptr, bool *haveBackupLabel_ptr, + bool *haveTblspcMap_ptr); extern void PerformWalRecovery(void); /* diff --git a/src/include/access/xlogutils.h b/src/include/access/xlogutils.h index ef182977bf9..18dc5f99a6b 100644 --- a/src/include/access/xlogutils.h +++ b/src/include/access/xlogutils.h @@ -82,10 +82,10 @@ typedef struct ReadLocalXLogPageNoWaitPrivate } ReadLocalXLogPageNoWaitPrivate; extern XLogRedoAction XLogReadBufferForRedo(XLogReaderState *record, - uint8 buffer_id, Buffer *buf); + uint8 block_id, Buffer *buf); extern Buffer XLogInitBufferForRedo(XLogReaderState *record, uint8 block_id); extern XLogRedoAction XLogReadBufferForRedoExtended(XLogReaderState *record, - uint8 buffer_id, + uint8 block_id, ReadBufferMode mode, bool get_cleanup_lock, Buffer *buf); |