mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +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:
@@ -223,7 +223,8 @@ typedef struct SerializedRanges
|
||||
|
||||
static SerializedRanges *brin_range_serialize(Ranges *range);
|
||||
|
||||
static Ranges *brin_range_deserialize(int maxvalues, SerializedRanges *range);
|
||||
static Ranges *brin_range_deserialize(int maxvalues,
|
||||
SerializedRanges *serialized);
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -733,11 +733,11 @@ add_reloption(relopt_gen *newoption)
|
||||
* 'relopt_struct_size'.
|
||||
*/
|
||||
void
|
||||
init_local_reloptions(local_relopts *opts, Size relopt_struct_size)
|
||||
init_local_reloptions(local_relopts *relopts, Size relopt_struct_size)
|
||||
{
|
||||
opts->options = NIL;
|
||||
opts->validators = NIL;
|
||||
opts->relopt_struct_size = relopt_struct_size;
|
||||
relopts->options = NIL;
|
||||
relopts->validators = NIL;
|
||||
relopts->relopt_struct_size = relopt_struct_size;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -746,9 +746,9 @@ init_local_reloptions(local_relopts *opts, Size relopt_struct_size)
|
||||
* build_local_reloptions().
|
||||
*/
|
||||
void
|
||||
register_reloptions_validator(local_relopts *opts, relopts_validator validator)
|
||||
register_reloptions_validator(local_relopts *relopts, relopts_validator validator)
|
||||
{
|
||||
opts->validators = lappend(opts->validators, validator);
|
||||
relopts->validators = lappend(relopts->validators, validator);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -281,11 +281,11 @@ ginCompressPostingList(const ItemPointer ipd, int nipd, int maxsize,
|
||||
* The number of items is returned in *ndecoded.
|
||||
*/
|
||||
ItemPointer
|
||||
ginPostingListDecode(GinPostingList *plist, int *ndecoded)
|
||||
ginPostingListDecode(GinPostingList *plist, int *ndecoded_out)
|
||||
{
|
||||
return ginPostingListDecodeAllSegments(plist,
|
||||
SizeOfGinPostingList(plist),
|
||||
ndecoded);
|
||||
ndecoded_out);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -162,7 +162,7 @@ static BlockNumber gistbufferinginserttuples(GISTBuildState *buildstate,
|
||||
BlockNumber parentblk, OffsetNumber downlinkoffnum);
|
||||
static Buffer gistBufferingFindCorrectParent(GISTBuildState *buildstate,
|
||||
BlockNumber childblkno, int level,
|
||||
BlockNumber *parentblk,
|
||||
BlockNumber *parentblkno,
|
||||
OffsetNumber *downlinkoffnum);
|
||||
static void gistProcessEmptyingQueue(GISTBuildState *buildstate);
|
||||
static void gistEmptyAllBuffers(GISTBuildState *buildstate);
|
||||
@@ -171,7 +171,8 @@ static int gistGetMaxLevel(Relation index);
|
||||
static void gistInitParentMap(GISTBuildState *buildstate);
|
||||
static void gistMemorizeParent(GISTBuildState *buildstate, BlockNumber child,
|
||||
BlockNumber parent);
|
||||
static void gistMemorizeAllDownlinks(GISTBuildState *buildstate, Buffer parent);
|
||||
static void gistMemorizeAllDownlinks(GISTBuildState *buildstate,
|
||||
Buffer parentbuf);
|
||||
static BlockNumber gistGetParent(GISTBuildState *buildstate, BlockNumber child);
|
||||
|
||||
|
||||
|
||||
@@ -31,9 +31,9 @@ static void gistLoadNodeBuffer(GISTBuildBuffers *gfbb,
|
||||
static void gistUnloadNodeBuffer(GISTBuildBuffers *gfbb,
|
||||
GISTNodeBuffer *nodeBuffer);
|
||||
static void gistPlaceItupToPage(GISTNodeBufferPage *pageBuffer,
|
||||
IndexTuple item);
|
||||
IndexTuple itup);
|
||||
static void gistGetItupFromPage(GISTNodeBufferPage *pageBuffer,
|
||||
IndexTuple *item);
|
||||
IndexTuple *itup);
|
||||
static long gistBuffersGetFreeBlock(GISTBuildBuffers *gfbb);
|
||||
static void gistBuffersReleaseBlock(GISTBuildBuffers *gfbb, long blocknum);
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ static void gistvacuumpage(GistVacState *vstate, BlockNumber blkno,
|
||||
static void gistvacuum_delete_empty_pages(IndexVacuumInfo *info,
|
||||
GistVacState *vstate);
|
||||
static bool gistdeletepage(IndexVacuumInfo *info, IndexBulkDeleteResult *stats,
|
||||
Buffer buffer, OffsetNumber downlink,
|
||||
Buffer parentBuffer, OffsetNumber downlink,
|
||||
Buffer leafBuffer);
|
||||
|
||||
/*
|
||||
|
||||
@@ -69,7 +69,7 @@ struct GenericXLogState
|
||||
};
|
||||
|
||||
static void writeFragment(PageData *pageData, OffsetNumber offset,
|
||||
OffsetNumber len, const char *data);
|
||||
OffsetNumber length, const char *data);
|
||||
static void computeRegionDelta(PageData *pageData,
|
||||
const char *curpage, const char *targetpage,
|
||||
int targetStart, int targetEnd,
|
||||
|
||||
@@ -354,7 +354,7 @@ static void AtSubStart_Memory(void);
|
||||
static void AtSubStart_ResourceOwner(void);
|
||||
|
||||
static void ShowTransactionState(const char *str);
|
||||
static void ShowTransactionStateRec(const char *str, TransactionState state);
|
||||
static void ShowTransactionStateRec(const char *str, TransactionState s);
|
||||
static const char *BlockStateAsString(TBlockState blockState);
|
||||
static const char *TransStateAsString(TransState state);
|
||||
|
||||
|
||||
@@ -648,7 +648,7 @@ static void XLogReportParameters(void);
|
||||
static int LocalSetXLogInsertAllowed(void);
|
||||
static void CreateEndOfRecoveryRecord(void);
|
||||
static XLogRecPtr CreateOverwriteContrecordRecord(XLogRecPtr aborted_lsn,
|
||||
XLogRecPtr missingContrecPtr,
|
||||
XLogRecPtr pagePtr,
|
||||
TimeLineID newTLI);
|
||||
static void CheckPointGuts(XLogRecPtr checkPointRedo, int flags);
|
||||
static void KeepLogSeg(XLogRecPtr recptr, XLogSegNo *logSegNo);
|
||||
|
||||
@@ -1094,7 +1094,7 @@ XLogSaveBufferForHint(Buffer buffer, bool buffer_std)
|
||||
* the unused space to be left out from the WAL record, making it smaller.
|
||||
*/
|
||||
XLogRecPtr
|
||||
log_newpage(RelFileLocator *rlocator, ForkNumber forkNum, BlockNumber blkno,
|
||||
log_newpage(RelFileLocator *rlocator, ForkNumber forknum, BlockNumber blkno,
|
||||
Page page, bool page_std)
|
||||
{
|
||||
int flags;
|
||||
@@ -1105,7 +1105,7 @@ log_newpage(RelFileLocator *rlocator, ForkNumber forkNum, BlockNumber blkno,
|
||||
flags |= REGBUF_STANDARD;
|
||||
|
||||
XLogBeginInsert();
|
||||
XLogRegisterBlock(0, rlocator, forkNum, blkno, page, flags);
|
||||
XLogRegisterBlock(0, rlocator, forknum, blkno, page, flags);
|
||||
recptr = XLogInsert(RM_XLOG_ID, XLOG_FPI);
|
||||
|
||||
/*
|
||||
@@ -1126,7 +1126,7 @@ log_newpage(RelFileLocator *rlocator, ForkNumber forkNum, BlockNumber blkno,
|
||||
* because we can write multiple pages in a single WAL record.
|
||||
*/
|
||||
void
|
||||
log_newpages(RelFileLocator *rlocator, ForkNumber forkNum, int num_pages,
|
||||
log_newpages(RelFileLocator *rlocator, ForkNumber forknum, int num_pages,
|
||||
BlockNumber *blknos, Page *pages, bool page_std)
|
||||
{
|
||||
int flags;
|
||||
@@ -1156,7 +1156,7 @@ log_newpages(RelFileLocator *rlocator, ForkNumber forkNum, int num_pages,
|
||||
nbatch = 0;
|
||||
while (nbatch < XLR_MAX_BLOCK_ID && i < num_pages)
|
||||
{
|
||||
XLogRegisterBlock(nbatch, rlocator, forkNum, blknos[i], pages[i], flags);
|
||||
XLogRegisterBlock(nbatch, rlocator, forknum, blknos[i], pages[i], flags);
|
||||
i++;
|
||||
nbatch++;
|
||||
}
|
||||
@@ -1192,15 +1192,15 @@ log_newpage_buffer(Buffer buffer, bool page_std)
|
||||
{
|
||||
Page page = BufferGetPage(buffer);
|
||||
RelFileLocator rlocator;
|
||||
ForkNumber forkNum;
|
||||
ForkNumber forknum;
|
||||
BlockNumber blkno;
|
||||
|
||||
/* Shared buffers should be modified in a critical section. */
|
||||
Assert(CritSectionCount > 0);
|
||||
|
||||
BufferGetTag(buffer, &rlocator, &forkNum, &blkno);
|
||||
BufferGetTag(buffer, &rlocator, &forknum, &blkno);
|
||||
|
||||
return log_newpage(&rlocator, forkNum, blkno, page, page_std);
|
||||
return log_newpage(&rlocator, forknum, blkno, page, page_std);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1221,7 +1221,7 @@ log_newpage_buffer(Buffer buffer, bool page_std)
|
||||
* cause a deadlock through some other means.
|
||||
*/
|
||||
void
|
||||
log_newpage_range(Relation rel, ForkNumber forkNum,
|
||||
log_newpage_range(Relation rel, ForkNumber forknum,
|
||||
BlockNumber startblk, BlockNumber endblk,
|
||||
bool page_std)
|
||||
{
|
||||
@@ -1253,7 +1253,7 @@ log_newpage_range(Relation rel, ForkNumber forkNum,
|
||||
nbufs = 0;
|
||||
while (nbufs < XLR_MAX_BLOCK_ID && blkno < endblk)
|
||||
{
|
||||
Buffer buf = ReadBufferExtended(rel, forkNum, blkno,
|
||||
Buffer buf = ReadBufferExtended(rel, forknum, blkno,
|
||||
RBM_NORMAL, NULL);
|
||||
|
||||
LockBuffer(buf, BUFFER_LOCK_EXCLUSIVE);
|
||||
|
||||
@@ -47,7 +47,7 @@ static bool allocate_recordbuf(XLogReaderState *state, uint32 reclength);
|
||||
static int ReadPageInternal(XLogReaderState *state, XLogRecPtr pageptr,
|
||||
int reqLen);
|
||||
static void XLogReaderInvalReadState(XLogReaderState *state);
|
||||
static XLogPageReadResult XLogDecodeNextRecord(XLogReaderState *state, bool non_blocking);
|
||||
static XLogPageReadResult XLogDecodeNextRecord(XLogReaderState *state, bool nonblocking);
|
||||
static bool ValidXLogRecordHeader(XLogReaderState *state, XLogRecPtr RecPtr,
|
||||
XLogRecPtr PrevRecPtr, XLogRecord *record, bool randAccess);
|
||||
static bool ValidXLogRecord(XLogReaderState *state, XLogRecord *record,
|
||||
|
||||
Reference in New Issue
Block a user