mirror of
https://github.com/postgres/postgres.git
synced 2025-10-21 02:52:47 +03:00
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 <pg@bowt.ie> Reviewed-By: David Rowley <dgrowleyml@gmail.com> Discussion: https://postgr.es/m/CAH2-WznJt9CMM9KJTMjJh_zbL5hD9oX44qdJ4aqZtjFi-zA3Tg@mail.gmail.com
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
|
@@ -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 */
|
||||
|
@@ -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);
|
||||
|
@@ -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,
|
||||
|
@@ -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,
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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,
|
||||
|
@@ -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 */
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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);
|
||||
|
||||
/*
|
||||
|
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user