Harmonize parameter names in storage and AM code.
authorPeter Geoghegan <[email protected]>
Tue, 20 Sep 2022 02:18:36 +0000 (19:18 -0700)
committerPeter Geoghegan <[email protected]>
Tue, 20 Sep 2022 02:18:36 +0000 (19:18 -0700)
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

80 files changed:
src/backend/access/brin/brin_minmax_multi.c
src/backend/access/common/reloptions.c
src/backend/access/gin/ginpostinglist.c
src/backend/access/gist/gistbuild.c
src/backend/access/gist/gistbuildbuffers.c
src/backend/access/gist/gistvacuum.c
src/backend/access/transam/generic_xlog.c
src/backend/access/transam/xact.c
src/backend/access/transam/xlog.c
src/backend/access/transam/xloginsert.c
src/backend/access/transam/xlogreader.c
src/backend/catalog/aclchk.c
src/backend/catalog/namespace.c
src/backend/commands/dbcommands.c
src/backend/executor/execIndexing.c
src/backend/executor/execParallel.c
src/backend/executor/nodeAgg.c
src/backend/executor/nodeHash.c
src/backend/executor/nodeHashjoin.c
src/backend/executor/nodeMemoize.c
src/backend/lib/bloomfilter.c
src/backend/replication/logical/decode.c
src/backend/replication/logical/worker.c
src/backend/replication/pgoutput/pgoutput.c
src/backend/replication/slot.c
src/backend/storage/buffer/bufmgr.c
src/backend/storage/file/buffile.c
src/backend/storage/freespace/freespace.c
src/backend/storage/ipc/dsm.c
src/backend/storage/ipc/procarray.c
src/backend/storage/lmgr/lwlock.c
src/backend/storage/lmgr/predicate.c
src/backend/storage/smgr/md.c
src/backend/utils/mb/conversion_procs/euc_jp_and_sjis/euc_jp_and_sjis.c
src/backend/utils/mb/conversion_procs/euc_tw_and_big5/euc_tw_and_big5.c
src/include/access/genam.h
src/include/access/generic_xlog.h
src/include/access/gin_private.h
src/include/access/gist_private.h
src/include/access/reloptions.h
src/include/access/tupconvert.h
src/include/access/tupdesc.h
src/include/access/twophase.h
src/include/access/xact.h
src/include/access/xlog.h
src/include/access/xloginsert.h
src/include/access/xlogreader.h
src/include/access/xlogrecovery.h
src/include/access/xlogutils.h
src/include/catalog/dependency.h
src/include/catalog/index.h
src/include/catalog/namespace.h
src/include/catalog/objectaccess.h
src/include/catalog/objectaddress.h
src/include/catalog/pg_conversion.h
src/include/catalog/pg_inherits.h
src/include/catalog/pg_publication.h
src/include/commands/copy.h
src/include/commands/dbcommands_xlog.h
src/include/executor/execParallel.h
src/include/executor/executor.h
src/include/executor/nodeIncrementalSort.h
src/include/executor/spi.h
src/include/mb/pg_wchar.h
src/include/miscadmin.h
src/include/replication/logical.h
src/include/replication/logicalproto.h
src/include/replication/origin.h
src/include/replication/slot.h
src/include/replication/walsender.h
src/include/storage/barrier.h
src/include/storage/bufpage.h
src/include/storage/dsm.h
src/include/storage/fd.h
src/include/storage/fsm_internals.h
src/include/storage/indexfsm.h
src/include/storage/lwlock.h
src/include/storage/predicate.h
src/include/storage/procarray.h
src/include/storage/standby.h

index dbad7764316d09141a63ba7b5b20759f53ba1cfb..ed16f93acc63a3c0e88ee8153993b6ec923649fa 100644 (file)
@@ -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);
 
 
 /*
index 0aa4b334ab0557d6a9f68710122c0b5d6a03dbdb..6458a9c27698a7e106b6932119bbee25123b0818 100644 (file)
@@ -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);
 }
 
 /*
index 6b73715496ca84847e85841bab77a4b9efe7d668..68356d55c0881042abde8c141246725cae91085b 100644 (file)
@@ -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);
 }
 
 /*
index 374e64e8086018cdda91401d192d51dc658170a0..fb0f466708c06a5f7de37023dc0e8f1c80eafddf 100644 (file)
@@ -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);
 
 
index c6c7dfe4c2d7b9312228fbba627fe61fa48f81ab..538e3880c9eb1a2d0935d005e82e028409439c8b 100644 (file)
@@ -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);
 
index f190decdff2f08511868438044cedc3b0faa7138..0aa6e58a62f467fe20101ce06a24a327a82c5e06 100644 (file)
@@ -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);
 
 /*
index bbb542b322253ac31926a510b33781736132efa9..6db9a1fca10b459b8b31c062b602fbbb34d6580a 100644 (file)
@@ -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,
index 7abc6a07056ff6ee0fbfa7d06d6b4fb4f0a305cc..2bb975943cf0a5591c9d627ba7358a8ed6e3a45d 100644 (file)
@@ -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);
 
index 81d339d57d7a278ef3fd65284a6a3965607b8d77..eb0430fe98f623e6dc80ca2afc641f61d68d83d9 100644 (file)
@@ -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);
index 24f9755e5d881e4d3232a60bbf708fe2c79a9be7..5ca15ebbf20ad450f254ad4dd96a56c91c6207e0 100644 (file)
@@ -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);
index 050d2f424e413d3229b9ad94c0c2dc3527ce2cbd..c1c9f1995bcb7a0c3cb36315453346161123104d 100644 (file)
@@ -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,
index dc4c1e748d24ecaeab2097514388cdeaec8b5068..aa5a2ed9483e71b74da18c277f2ef4f108c88590 100644 (file)
@@ -104,17 +104,17 @@ typedef struct
 bool       binary_upgrade_record_init_privs = false;
 
 static void ExecGrantStmt_oids(InternalGrant *istmt);
-static void ExecGrant_Relation(InternalGrant *grantStmt);
-static void ExecGrant_Database(InternalGrant *grantStmt);
-static void ExecGrant_Fdw(InternalGrant *grantStmt);
-static void ExecGrant_ForeignServer(InternalGrant *grantStmt);
-static void ExecGrant_Function(InternalGrant *grantStmt);
-static void ExecGrant_Language(InternalGrant *grantStmt);
-static void ExecGrant_Largeobject(InternalGrant *grantStmt);
-static void ExecGrant_Namespace(InternalGrant *grantStmt);
-static void ExecGrant_Tablespace(InternalGrant *grantStmt);
-static void ExecGrant_Type(InternalGrant *grantStmt);
-static void ExecGrant_Parameter(InternalGrant *grantStmt);
+static void ExecGrant_Relation(InternalGrant *istmt);
+static void ExecGrant_Database(InternalGrant *istmt);
+static void ExecGrant_Fdw(InternalGrant *istmt);
+static void ExecGrant_ForeignServer(InternalGrant *istmt);
+static void ExecGrant_Function(InternalGrant *istmt);
+static void ExecGrant_Language(InternalGrant *istmt);
+static void ExecGrant_Largeobject(InternalGrant *istmt);
+static void ExecGrant_Namespace(InternalGrant *istmt);
+static void ExecGrant_Tablespace(InternalGrant *istmt);
+static void ExecGrant_Type(InternalGrant *istmt);
+static void ExecGrant_Parameter(InternalGrant *istmt);
 
 static void SetDefaultACLsInSchemas(InternalDefaultACL *iacls, List *nspnames);
 static void SetDefaultACL(InternalDefaultACL *iacls);
index dbb4b008a0bc5c6524b699ee13a317f00867cb2a..a7022824d8fc225fb5bc58e8f1d0d31809b401fb 100644 (file)
@@ -3644,7 +3644,7 @@ PopOverrideSearchPath(void)
  * database's encoding.
  */
 Oid
-get_collation_oid(List *name, bool missing_ok)
+get_collation_oid(List *collname, bool missing_ok)
 {
    char       *schemaname;
    char       *collation_name;
@@ -3654,7 +3654,7 @@ get_collation_oid(List *name, bool missing_ok)
    ListCell   *l;
 
    /* deconstruct the name list */
-   DeconstructQualifiedName(name, &schemaname, &collation_name);
+   DeconstructQualifiedName(collname, &schemaname, &collation_name);
 
    if (schemaname)
    {
@@ -3690,7 +3690,7 @@ get_collation_oid(List *name, bool missing_ok)
        ereport(ERROR,
                (errcode(ERRCODE_UNDEFINED_OBJECT),
                 errmsg("collation \"%s\" for encoding \"%s\" does not exist",
-                       NameListToString(name), GetDatabaseEncodingName())));
+                       NameListToString(collname), GetDatabaseEncodingName())));
    return InvalidOid;
 }
 
@@ -3698,7 +3698,7 @@ get_collation_oid(List *name, bool missing_ok)
  * get_conversion_oid - find a conversion by possibly qualified name
  */
 Oid
-get_conversion_oid(List *name, bool missing_ok)
+get_conversion_oid(List *conname, bool missing_ok)
 {
    char       *schemaname;
    char       *conversion_name;
@@ -3707,7 +3707,7 @@ get_conversion_oid(List *name, bool missing_ok)
    ListCell   *l;
 
    /* deconstruct the name list */
-   DeconstructQualifiedName(name, &schemaname, &conversion_name);
+   DeconstructQualifiedName(conname, &schemaname, &conversion_name);
 
    if (schemaname)
    {
@@ -3745,7 +3745,7 @@ get_conversion_oid(List *name, bool missing_ok)
        ereport(ERROR,
                (errcode(ERRCODE_UNDEFINED_OBJECT),
                 errmsg("conversion \"%s\" does not exist",
-                       NameListToString(name))));
+                       NameListToString(conname))));
    return conoid;
 }
 
index f248ad42b77c8c0cf2089963d4357b120914ce20..308dc93f63fc5660797c0e9367fdc4775d16b4ac 100644 (file)
@@ -125,9 +125,9 @@ static bool have_createdb_privilege(void);
 static void remove_dbtablespaces(Oid db_id);
 static bool check_db_file_conflict(Oid db_id);
 static int errdetail_busy_db(int notherbackends, int npreparedxacts);
-static void CreateDatabaseUsingWalLog(Oid src_dboid, Oid dboid, Oid src_tsid,
+static void CreateDatabaseUsingWalLog(Oid src_dboid, Oid dst_dboid, Oid src_tsid,
                                      Oid dst_tsid);
-static List *ScanSourceDatabasePgClass(Oid srctbid, Oid srcdbid, char *srcpath);
+static List *ScanSourceDatabasePgClass(Oid tbid, Oid dbid, char *srcpath);
 static List *ScanSourceDatabasePgClassPage(Page page, Buffer buf, Oid tbid,
                                           Oid dbid, char *srcpath,
                                           List *rlocatorlist, Snapshot snapshot);
@@ -136,8 +136,8 @@ static CreateDBRelInfo *ScanSourceDatabasePgClassTuple(HeapTupleData *tuple,
                                                       char *srcpath);
 static void CreateDirAndVersionFile(char *dbpath, Oid dbid, Oid tsid,
                                    bool isRedo);
-static void CreateDatabaseUsingFileCopy(Oid src_dboid, Oid dboid, Oid src_tsid,
-                                       Oid dst_tsid);
+static void CreateDatabaseUsingFileCopy(Oid src_dboid, Oid dst_dboid,
+                                       Oid src_tsid, Oid dst_tsid);
 static void recovery_create_dbdir(char *path, bool only_tblspc);
 
 /*
index 6a8735edf7fcfead56bc0ad1c158c0c3ee2663f5..1f1181b56044a599398433a0f7feb45206a28abd 100644 (file)
@@ -130,7 +130,7 @@ static bool check_exclusion_or_unique_constraint(Relation heap, Relation index,
                                                 Datum *values, bool *isnull,
                                                 EState *estate, bool newIndex,
                                                 CEOUC_WAIT_MODE waitMode,
-                                                bool errorOK,
+                                                bool violationOK,
                                                 ItemPointer conflictTid);
 
 static bool index_recheck_constraint(Relation index, Oid *constr_procs,
index f1fd7f7e8b235b54c9be39c8bb43bfd5c63ef619..99512826c5436edeb13976ab26ebf8661476c54a 100644 (file)
@@ -126,9 +126,9 @@ typedef struct ExecParallelInitializeDSMContext
 
 /* Helper functions that run in the parallel leader. */
 static char *ExecSerializePlan(Plan *plan, EState *estate);
-static bool ExecParallelEstimate(PlanState *node,
+static bool ExecParallelEstimate(PlanState *planstate,
                                 ExecParallelEstimateContext *e);
-static bool ExecParallelInitializeDSM(PlanState *node,
+static bool ExecParallelInitializeDSM(PlanState *planstate,
                                      ExecParallelInitializeDSMContext *d);
 static shm_mq_handle **ExecParallelSetupTupleQueues(ParallelContext *pcxt,
                                                    bool reinitialize);
index 933c30490162d1b0d14d17e74bfd4aca0826b6a7..fe74e498145f021838b89034a20ba232284f4076 100644 (file)
@@ -396,7 +396,7 @@ static void prepare_projection_slot(AggState *aggstate,
                                    TupleTableSlot *slot,
                                    int currentSet);
 static void finalize_aggregates(AggState *aggstate,
-                               AggStatePerAgg peragg,
+                               AggStatePerAgg peraggs,
                                AggStatePerGroup pergroup);
 static TupleTableSlot *project_aggregates(AggState *aggstate);
 static void find_cols(AggState *aggstate, Bitmapset **aggregated,
@@ -407,12 +407,11 @@ static void build_hash_table(AggState *aggstate, int setno, long nbuckets);
 static void hashagg_recompile_expressions(AggState *aggstate, bool minslot,
                                          bool nullcheck);
 static long hash_choose_num_buckets(double hashentrysize,
-                                   long estimated_nbuckets,
-                                   Size memory);
+                                   long ngroups, Size memory);
 static int hash_choose_num_partitions(double input_groups,
                                       double hashentrysize,
                                       int used_bits,
-                                      int *log2_npartittions);
+                                      int *log2_npartitions);
 static void initialize_hash_entry(AggState *aggstate,
                                  TupleHashTable hashtable,
                                  TupleHashEntry entry);
@@ -432,11 +431,11 @@ static HashAggBatch *hashagg_batch_new(LogicalTape *input_tape, int setno,
                                       int64 input_tuples, double input_card,
                                       int used_bits);
 static MinimalTuple hashagg_batch_read(HashAggBatch *batch, uint32 *hashp);
-static void hashagg_spill_init(HashAggSpill *spill, LogicalTapeSet *lts,
+static void hashagg_spill_init(HashAggSpill *spill, LogicalTapeSet *tapeset,
                               int used_bits, double input_groups,
                               double hashentrysize);
 static Size hashagg_spill_tuple(AggState *aggstate, HashAggSpill *spill,
-                               TupleTableSlot *slot, uint32 hash);
+                               TupleTableSlot *inputslot, uint32 hash);
 static void hashagg_spill_finish(AggState *aggstate, HashAggSpill *spill,
                                 int setno);
 static Datum GetAggInitVal(Datum textInitVal, Oid transtype);
index 77dd1dae8bb1be77c5797cc1db789d755f18b6c7..6622b202c229f656a1044ed826f2f6d6f9abfb31 100644 (file)
@@ -62,9 +62,9 @@ static HashJoinTuple ExecParallelHashTupleAlloc(HashJoinTable hashtable,
                                                dsa_pointer *shared);
 static void MultiExecPrivateHash(HashState *node);
 static void MultiExecParallelHash(HashState *node);
-static inline HashJoinTuple ExecParallelHashFirstTuple(HashJoinTable table,
+static inline HashJoinTuple ExecParallelHashFirstTuple(HashJoinTable hashtable,
                                                       int bucketno);
-static inline HashJoinTuple ExecParallelHashNextTuple(HashJoinTable table,
+static inline HashJoinTuple ExecParallelHashNextTuple(HashJoinTable hashtable,
                                                      HashJoinTuple tuple);
 static inline void ExecParallelHashPushTuple(dsa_pointer_atomic *head,
                                             HashJoinTuple tuple,
@@ -73,7 +73,7 @@ static void ExecParallelHashJoinSetUpBatches(HashJoinTable hashtable, int nbatch
 static void ExecParallelHashEnsureBatchAccessors(HashJoinTable hashtable);
 static void ExecParallelHashRepartitionFirst(HashJoinTable hashtable);
 static void ExecParallelHashRepartitionRest(HashJoinTable hashtable);
-static HashMemoryChunk ExecParallelHashPopChunkQueue(HashJoinTable table,
+static HashMemoryChunk ExecParallelHashPopChunkQueue(HashJoinTable hashtable,
                                                     dsa_pointer *shared);
 static bool ExecParallelHashTuplePrealloc(HashJoinTable hashtable,
                                          int batchno,
index 87403e247813c081686ab696a5c1208fe1f1c6f7..2718c2113f586f6cf14c7ad68f00c965c888e553 100644 (file)
@@ -145,7 +145,7 @@ static TupleTableSlot *ExecHashJoinGetSavedTuple(HashJoinState *hjstate,
                                                 TupleTableSlot *tupleSlot);
 static bool ExecHashJoinNewBatch(HashJoinState *hjstate);
 static bool ExecParallelHashJoinNewBatch(HashJoinState *hjstate);
-static void ExecParallelHashJoinPartitionOuter(HashJoinState *node);
+static void ExecParallelHashJoinPartitionOuter(HashJoinState *hjstate);
 
 
 /* ----------------------------------------------------------------
@@ -1502,11 +1502,11 @@ ExecHashJoinInitializeDSM(HashJoinState *state, ParallelContext *pcxt)
  * ----------------------------------------------------------------
  */
 void
-ExecHashJoinReInitializeDSM(HashJoinState *state, ParallelContext *cxt)
+ExecHashJoinReInitializeDSM(HashJoinState *state, ParallelContext *pcxt)
 {
    int         plan_node_id = state->js.ps.plan->plan_node_id;
    ParallelHashJoinState *pstate =
-   shm_toc_lookup(cxt->toc, plan_node_id, false);
+   shm_toc_lookup(pcxt->toc, plan_node_id, false);
 
    /*
     * It would be possible to reuse the shared hash table in single-batch
index d2bceb97c3a25b880634702f1c4f117bc387fecc..7bfe02464ec35a09612f4f9e892ec92cb6d7543e 100644 (file)
@@ -133,8 +133,8 @@ typedef struct MemoizeEntry
 static uint32 MemoizeHash_hash(struct memoize_hash *tb,
                               const MemoizeKey *key);
 static bool MemoizeHash_equal(struct memoize_hash *tb,
-                             const MemoizeKey *params1,
-                             const MemoizeKey *params2);
+                             const MemoizeKey *key1,
+                             const MemoizeKey *key2);
 
 #define SH_PREFIX memoize
 #define SH_ELEMENT_TYPE MemoizeEntry
index 465ca7cf673a0592bd9b70086dda8040da767126..3ef67d35acbfdd5535d04eb37724910e2aa7b90b 100644 (file)
@@ -55,7 +55,7 @@ static int    my_bloom_power(uint64 target_bitset_bits);
 static int optimal_k(uint64 bitset_bits, int64 total_elems);
 static void k_hashes(bloom_filter *filter, uint32 *hashes, unsigned char *elem,
                     size_t len);
-static inline uint32 mod_m(uint32 a, uint64 m);
+static inline uint32 mod_m(uint32 val, uint64 m);
 
 /*
  * Create Bloom filter in caller's memory context.  We aim for a false positive
index 4264da5bb002dc71e5ce59378b17722a22cfbd71..98c40e17b6c7e10ba0b5650b932c5f7e50d07ca2 100644 (file)
@@ -62,13 +62,13 @@ static void DecodePrepare(LogicalDecodingContext *ctx, XLogRecordBuffer *buf,
 
 
 /* common function to decode tuples */
-static void DecodeXLogTuple(char *data, Size len, ReorderBufferTupleBuf *tup);
+static void DecodeXLogTuple(char *data, Size len, ReorderBufferTupleBuf *tuple);
 
 /* helper functions for decoding transactions */
 static inline bool FilterPrepare(LogicalDecodingContext *ctx,
                                 TransactionId xid, const char *gid);
 static bool DecodeTXNNeedSkip(LogicalDecodingContext *ctx,
-                             XLogRecordBuffer *buf, Oid dbId,
+                             XLogRecordBuffer *buf, Oid txn_dbid,
                              RepOriginId origin_id);
 
 /*
index eaca406d3017751c99791b1831b87f3c148e32ad..56f753d987d9656d1e2c7c591d1e2a24c686379b 100644 (file)
@@ -312,7 +312,8 @@ static inline void cleanup_subxact_info(void);
  * Serialize and deserialize changes for a toplevel transaction.
  */
 static void stream_cleanup_files(Oid subid, TransactionId xid);
-static void stream_open_file(Oid subid, TransactionId xid, bool first);
+static void stream_open_file(Oid subid, TransactionId xid,
+                            bool first_segment);
 static void stream_write_change(char action, StringInfo s);
 static void stream_close_file(void);
 
index 62e0ffecd8fc39cd3bb9470c07c4e58421036f80..03b13ae6798d50bb9a357a866cf0b6f317f4723d 100644 (file)
@@ -44,7 +44,7 @@ static void pgoutput_begin_txn(LogicalDecodingContext *ctx,
 static void pgoutput_commit_txn(LogicalDecodingContext *ctx,
                                ReorderBufferTXN *txn, XLogRecPtr commit_lsn);
 static void pgoutput_change(LogicalDecodingContext *ctx,
-                           ReorderBufferTXN *txn, Relation rel,
+                           ReorderBufferTXN *txn, Relation relation,
                            ReorderBufferChange *change);
 static void pgoutput_truncate(LogicalDecodingContext *ctx,
                              ReorderBufferTXN *txn, int nrelations, Relation relations[],
@@ -212,7 +212,7 @@ typedef struct PGOutputTxnData
 /* Map used to remember which relation schemas we sent. */
 static HTAB *RelationSyncCache = NULL;
 
-static void init_rel_sync_cache(MemoryContext decoding_context);
+static void init_rel_sync_cache(MemoryContext cachectx);
 static void cleanup_rel_sync_cache(TransactionId xid, bool is_commit);
 static RelationSyncEntry *get_rel_sync_entry(PGOutputData *data,
                                             Relation relation);
index 8fec1cb4a54bf900d8dd43f94d8fd276aaf12b52..0bd0031188814b70896e595691359d494992cd78 100644 (file)
@@ -108,7 +108,7 @@ static void ReplicationSlotDropPtr(ReplicationSlot *slot);
 /* internal persistency functions */
 static void RestoreSlotFromDisk(const char *name);
 static void CreateSlotOnDisk(ReplicationSlot *slot);
-static void SaveSlotToPath(ReplicationSlot *slot, const char *path, int elevel);
+static void SaveSlotToPath(ReplicationSlot *slot, const char *dir, int elevel);
 
 /*
  * Report shared-memory space needed by ReplicationSlotsShmemInit.
index e898ffad7bb6c62757b35c1c39430aaecd03eed9..5b0e531f979efe9badd010f61292e9fb6bdfbe05 100644 (file)
@@ -459,7 +459,7 @@ ForgetPrivateRefCountEntry(PrivateRefCountEntry *ref)
 )
 
 
-static Buffer ReadBuffer_common(SMgrRelation reln, char relpersistence,
+static Buffer ReadBuffer_common(SMgrRelation smgr, char relpersistence,
                                ForkNumber forkNum, BlockNumber blockNum,
                                ReadBufferMode mode, BufferAccessStrategy strategy,
                                bool *hit);
@@ -493,7 +493,7 @@ static void RelationCopyStorageUsingBuffer(RelFileLocator srclocator,
 static void AtProcExit_Buffers(int code, Datum arg);
 static void CheckForBufferLeaks(void);
 static int rlocator_comparator(const void *p1, const void *p2);
-static inline int buffertag_comparator(const BufferTag *a, const BufferTag *b);
+static inline int buffertag_comparator(const BufferTag *ba, const BufferTag *bb);
 static inline int ckpt_buforder_comparator(const CkptSortItem *a, const CkptSortItem *b);
 static int ts_ckpt_progress_comparator(Datum a, Datum b, void *arg);
 
index 56b88594cc8dbf8a00069069bfd6024bc3318b1f..b0b4eeb3bdd2de5f36e7820257d126724c0efa09 100644 (file)
@@ -104,7 +104,7 @@ static void extendBufFile(BufFile *file);
 static void BufFileLoadBuffer(BufFile *file);
 static void BufFileDumpBuffer(BufFile *file);
 static void BufFileFlush(BufFile *file);
-static File MakeNewFileSetSegment(BufFile *file, int segment);
+static File MakeNewFileSetSegment(BufFile *buffile, int segment);
 
 /*
  * Create BufFile and perform the common initialization.
index 005def56dcb869581cc3a0abca109e9207e9a026..a6b05331032fadc30807434363112ce880678f74 100644 (file)
@@ -111,7 +111,7 @@ static int  fsm_set_and_search(Relation rel, FSMAddress addr, uint16 slot,
 static BlockNumber fsm_search(Relation rel, uint8 min_cat);
 static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
                             BlockNumber start, BlockNumber end,
-                            bool *eof);
+                            bool *eof_p);
 
 
 /******** Public API ********/
index 9d86bbe8724686035ed5462fd19ee50b1c8cb31c..a360325f86416361b7664e9b88f19ecc285e6a3c 100644 (file)
@@ -1045,7 +1045,7 @@ dsm_unpin_segment(dsm_handle handle)
  * Find an existing mapping for a shared memory segment, if there is one.
  */
 dsm_segment *
-dsm_find_mapping(dsm_handle h)
+dsm_find_mapping(dsm_handle handle)
 {
    dlist_iter  iter;
    dsm_segment *seg;
@@ -1053,7 +1053,7 @@ dsm_find_mapping(dsm_handle h)
    dlist_foreach(iter, &dsm_segment_list)
    {
        seg = dlist_container(dsm_segment, node, iter.cur);
-       if (seg->handle == h)
+       if (seg->handle == handle)
            return seg;
    }
 
index 0555b02a8d95365f19dce5c5ddb13b8085b47218..382f4cfb736e4240d00919d97f065e4dae151465 100644 (file)
@@ -343,7 +343,7 @@ static bool KnownAssignedXidExists(TransactionId xid);
 static void KnownAssignedXidsRemove(TransactionId xid);
 static void KnownAssignedXidsRemoveTree(TransactionId xid, int nsubxids,
                                        TransactionId *subxids);
-static void KnownAssignedXidsRemovePreceding(TransactionId xid);
+static void KnownAssignedXidsRemovePreceding(TransactionId removeXid);
 static int KnownAssignedXidsGet(TransactionId *xarray, TransactionId xmax);
 static int KnownAssignedXidsGetAndSetXmin(TransactionId *xarray,
                                           TransactionId *xmin,
index 38317edaf96f0c3a292561ecbfcd01f4fbea3b2f..d274c9b1dc95e31a319084458fdc2eac132ab5bf 100644 (file)
@@ -1913,13 +1913,13 @@ LWLockReleaseAll(void)
  * This is meant as debug support only.
  */
 bool
-LWLockHeldByMe(LWLock *l)
+LWLockHeldByMe(LWLock *lock)
 {
    int         i;
 
    for (i = 0; i < num_held_lwlocks; i++)
    {
-       if (held_lwlocks[i].lock == l)
+       if (held_lwlocks[i].lock == lock)
            return true;
    }
    return false;
@@ -1931,14 +1931,14 @@ LWLockHeldByMe(LWLock *l)
  * This is meant as debug support only.
  */
 bool
-LWLockAnyHeldByMe(LWLock *l, int nlocks, size_t stride)
+LWLockAnyHeldByMe(LWLock *lock, int nlocks, size_t stride)
 {
    char       *held_lock_addr;
    char       *begin;
    char       *end;
    int         i;
 
-   begin = (char *) l;
+   begin = (char *) lock;
    end = begin + nlocks * stride;
    for (i = 0; i < num_held_lwlocks; i++)
    {
@@ -1957,13 +1957,13 @@ LWLockAnyHeldByMe(LWLock *l, int nlocks, size_t stride)
  * This is meant as debug support only.
  */
 bool
-LWLockHeldByMeInMode(LWLock *l, LWLockMode mode)
+LWLockHeldByMeInMode(LWLock *lock, LWLockMode mode)
 {
    int         i;
 
    for (i = 0; i < num_held_lwlocks; i++)
    {
-       if (held_lwlocks[i].lock == l && held_lwlocks[i].mode == mode)
+       if (held_lwlocks[i].lock == lock && held_lwlocks[i].mode == mode)
            return true;
    }
    return false;
index 562ac5b4321a7ab84629d766dedbf71f457750bc..5f2a4805d82d07ebe1e36686f81265652fbc74fb 100644 (file)
@@ -446,7 +446,7 @@ static void SerialSetActiveSerXmin(TransactionId xid);
 
 static uint32 predicatelock_hash(const void *key, Size keysize);
 static void SummarizeOldestCommittedSxact(void);
-static Snapshot GetSafeSnapshot(Snapshot snapshot);
+static Snapshot GetSafeSnapshot(Snapshot origSnapshot);
 static Snapshot GetSerializableTransactionSnapshotInt(Snapshot snapshot,
                                                      VirtualTransactionId *sourcevxid,
                                                      int sourcepid);
index 3deac496eed3fd93b4f59a9aa4cc547e0325345f..a515bb36ac16635d4761acd4321531cfe6b72b45 100644 (file)
@@ -121,7 +121,7 @@ static MemoryContext MdCxt;     /* context for all MdfdVec objects */
 
 
 /* local routines */
-static void mdunlinkfork(RelFileLocatorBackend rlocator, ForkNumber forkNum,
+static void mdunlinkfork(RelFileLocatorBackend rlocator, ForkNumber forknum,
                         bool isRedo);
 static MdfdVec *mdopenfork(SMgrRelation reln, ForkNumber forknum, int behavior);
 static void register_dirty_segment(SMgrRelation reln, ForkNumber forknum,
@@ -135,9 +135,9 @@ static void _fdvec_resize(SMgrRelation reln,
                          int nseg);
 static char *_mdfd_segpath(SMgrRelation reln, ForkNumber forknum,
                           BlockNumber segno);
-static MdfdVec *_mdfd_openseg(SMgrRelation reln, ForkNumber forkno,
+static MdfdVec *_mdfd_openseg(SMgrRelation reln, ForkNumber forknum,
                              BlockNumber segno, int oflags);
-static MdfdVec *_mdfd_getseg(SMgrRelation reln, ForkNumber forkno,
+static MdfdVec *_mdfd_getseg(SMgrRelation reln, ForkNumber forknum,
                             BlockNumber blkno, bool skipFsync, int behavior);
 static BlockNumber _mdnblocks(SMgrRelation reln, ForkNumber forknum,
                              MdfdVec *seg);
@@ -160,7 +160,7 @@ mdinit(void)
  * Note: this will return true for lingering files, with pending deletions
  */
 bool
-mdexists(SMgrRelation reln, ForkNumber forkNum)
+mdexists(SMgrRelation reln, ForkNumber forknum)
 {
    /*
     * Close it first, to ensure that we notice if the fork has been unlinked
@@ -168,9 +168,9 @@ mdexists(SMgrRelation reln, ForkNumber forkNum)
     * which already closes relations when dropping them.
     */
    if (!InRecovery)
-       mdclose(reln, forkNum);
+       mdclose(reln, forknum);
 
-   return (mdopenfork(reln, forkNum, EXTENSION_RETURN_NULL) != NULL);
+   return (mdopenfork(reln, forknum, EXTENSION_RETURN_NULL) != NULL);
 }
 
 /*
@@ -179,16 +179,16 @@ mdexists(SMgrRelation reln, ForkNumber forkNum)
  * If isRedo is true, it's okay for the relation to exist already.
  */
 void
-mdcreate(SMgrRelation reln, ForkNumber forkNum, bool isRedo)
+mdcreate(SMgrRelation reln, ForkNumber forknum, bool isRedo)
 {
    MdfdVec    *mdfd;
    char       *path;
    File        fd;
 
-   if (isRedo && reln->md_num_open_segs[forkNum] > 0)
+   if (isRedo && reln->md_num_open_segs[forknum] > 0)
        return;                 /* created and opened already... */
 
-   Assert(reln->md_num_open_segs[forkNum] == 0);
+   Assert(reln->md_num_open_segs[forknum] == 0);
 
    /*
     * We may be using the target table space for the first time in this
@@ -203,7 +203,7 @@ mdcreate(SMgrRelation reln, ForkNumber forkNum, bool isRedo)
                            reln->smgr_rlocator.locator.dbOid,
                            isRedo);
 
-   path = relpath(reln->smgr_rlocator, forkNum);
+   path = relpath(reln->smgr_rlocator, forknum);
 
    fd = PathNameOpenFile(path, O_RDWR | O_CREAT | O_EXCL | PG_BINARY);
 
@@ -225,8 +225,8 @@ mdcreate(SMgrRelation reln, ForkNumber forkNum, bool isRedo)
 
    pfree(path);
 
-   _fdvec_resize(reln, forkNum, 1);
-   mdfd = &reln->md_seg_fds[forkNum][0];
+   _fdvec_resize(reln, forknum, 1);
+   mdfd = &reln->md_seg_fds[forknum][0];
    mdfd->mdfd_vfd = fd;
    mdfd->mdfd_segno = 0;
 }
@@ -237,7 +237,7 @@ mdcreate(SMgrRelation reln, ForkNumber forkNum, bool isRedo)
  * Note that we're passed a RelFileLocatorBackend --- by the time this is called,
  * there won't be an SMgrRelation hashtable entry anymore.
  *
- * forkNum can be a fork number to delete a specific fork, or InvalidForkNumber
+ * forknum can be a fork number to delete a specific fork, or InvalidForkNumber
  * to delete all forks.
  *
  * For regular relations, we don't unlink the first segment file of the rel,
@@ -278,16 +278,16 @@ mdcreate(SMgrRelation reln, ForkNumber forkNum, bool isRedo)
  * we are usually not in a transaction anymore when this is called.
  */
 void
-mdunlink(RelFileLocatorBackend rlocator, ForkNumber forkNum, bool isRedo)
+mdunlink(RelFileLocatorBackend rlocator, ForkNumber forknum, bool isRedo)
 {
    /* Now do the per-fork work */
-   if (forkNum == InvalidForkNumber)
+   if (forknum == InvalidForkNumber)
    {
-       for (forkNum = 0; forkNum <= MAX_FORKNUM; forkNum++)
-           mdunlinkfork(rlocator, forkNum, isRedo);
+       for (forknum = 0; forknum <= MAX_FORKNUM; forknum++)
+           mdunlinkfork(rlocator, forknum, isRedo);
    }
    else
-       mdunlinkfork(rlocator, forkNum, isRedo);
+       mdunlinkfork(rlocator, forknum, isRedo);
 }
 
 /*
@@ -315,18 +315,18 @@ do_truncate(const char *path)
 }
 
 static void
-mdunlinkfork(RelFileLocatorBackend rlocator, ForkNumber forkNum, bool isRedo)
+mdunlinkfork(RelFileLocatorBackend rlocator, ForkNumber forknum, bool isRedo)
 {
    char       *path;
    int         ret;
    BlockNumber segno = 0;
 
-   path = relpath(rlocator, forkNum);
+   path = relpath(rlocator, forknum);
 
    /*
     * Delete or truncate the first segment.
     */
-   if (isRedo || forkNum != MAIN_FORKNUM || RelFileLocatorBackendIsTemp(rlocator))
+   if (isRedo || forknum != MAIN_FORKNUM || RelFileLocatorBackendIsTemp(rlocator))
    {
        if (!RelFileLocatorBackendIsTemp(rlocator))
        {
@@ -334,7 +334,7 @@ mdunlinkfork(RelFileLocatorBackend rlocator, ForkNumber forkNum, bool isRedo)
            ret = do_truncate(path);
 
            /* Forget any pending sync requests for the first segment */
-           register_forget_request(rlocator, forkNum, 0 /* first seg */ );
+           register_forget_request(rlocator, forknum, 0 /* first seg */ );
        }
        else
            ret = 0;
@@ -367,7 +367,7 @@ mdunlinkfork(RelFileLocatorBackend rlocator, ForkNumber forkNum, bool isRedo)
         */
        if (!IsBinaryUpgrade)
        {
-           register_unlink_segment(rlocator, forkNum, 0 /* first seg */ );
+           register_unlink_segment(rlocator, forknum, 0 /* first seg */ );
            ++segno;
        }
    }
@@ -403,7 +403,7 @@ mdunlinkfork(RelFileLocatorBackend rlocator, ForkNumber forkNum, bool isRedo)
                 * Forget any pending sync requests for this segment before we
                 * try to unlink.
                 */
-               register_forget_request(rlocator, forkNum, segno);
+               register_forget_request(rlocator, forknum, segno);
            }
 
            if (unlink(segpath) < 0)
index 93493d41514932ed43ab08ca3d0fc37903b44814..25791e23e19cdffabed815db871277fb3cdaaf27 100644 (file)
@@ -54,8 +54,8 @@ static int    sjis2mic(const unsigned char *sjis, unsigned char *p, int len, bool n
 static int mic2sjis(const unsigned char *mic, unsigned char *p, int len, bool noError);
 static int euc_jp2mic(const unsigned char *euc, unsigned char *p, int len, bool noError);
 static int mic2euc_jp(const unsigned char *mic, unsigned char *p, int len, bool noError);
-static int euc_jp2sjis(const unsigned char *mic, unsigned char *p, int len, bool noError);
-static int sjis2euc_jp(const unsigned char *mic, unsigned char *p, int len, bool noError);
+static int euc_jp2sjis(const unsigned char *euc, unsigned char *p, int len, bool noError);
+static int sjis2euc_jp(const unsigned char *sjis, unsigned char *p, int len, bool noError);
 
 Datum
 euc_jp_to_sjis(PG_FUNCTION_ARGS)
index e00a2ca41576070121c1794a53818e5a598d6d78..88e0deb5e96aa7d7fd7d5ab17c5de0fc75dceb04 100644 (file)
@@ -41,7 +41,7 @@ PG_FUNCTION_INFO_V1(mic_to_big5);
  */
 
 static int euc_tw2big5(const unsigned char *euc, unsigned char *p, int len, bool noError);
-static int big52euc_tw(const unsigned char *euc, unsigned char *p, int len, bool noError);
+static int big52euc_tw(const unsigned char *big5, unsigned char *p, int len, bool noError);
 static int big52mic(const unsigned char *big5, unsigned char *p, int len, bool noError);
 static int mic2big5(const unsigned char *mic, unsigned char *p, int len, bool noError);
 static int euc_tw2mic(const unsigned char *euc, unsigned char *p, int len, bool noError);
index 134b20f1e64db02692bdd3b2cf19a6a989376a7f..e1c4fdbd03098de17401293b2e569262a9b2d0b3 100644 (file)
@@ -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);
 
 
index c8363a47666246586ce73dd01f461b78b74775b7..da45656427273a74726a4d6a754fdc841eb84fa4 100644 (file)
@@ -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 */
index 2935d2f353c68de33ccf63df2a5e233c71254e97..145ec7743cc8704cd9a6c4e1019d2f9bd8364c0d 100644 (file)
@@ -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);
index 240131ef71d9d21982c56f693c9d3ec2d2ca4ff5..093bf23443c0f32d90a397f0e01282efffd524a7 100644 (file)
@@ -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,
index f7405133032875e32bd22bc1a7a8c43c4a605502..21bde78ed0974c4141a297241c47d87c50ed1b99 100644 (file)
@@ -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,
index f5a5fd826a82c95a8c76fac5c9421631c3e65d0a..a37dafc666d9be051215b6dfaa8183b55be8c672 100644 (file)
@@ -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);
 
index 28dd6de18b222d69104caa1987f20bcd46ffdcf7..cf27356ba9a5f9eb889bf87ca31f38ffd6c9dd77 100644 (file)
@@ -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,
index 5d6544e267062a4372a03597016019378a0a7f5f..f94fded10059a42d389bba667fdc1a371ab01cdf 100644 (file)
@@ -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 */
index 300baae1209608d65128f8bba35b023b4ea95b3b..c604ee11f85e691902622577da3e2d515fd992ef 100644 (file)
@@ -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);
index 9ebd321ba7626e4769ad0b2c88821ee0b8bb45be..3dbfa6b5932e9b9a7756aa4909f22ebe3362c087 100644 (file)
@@ -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);
index aed4643d1c5a70409035b605ebfb651eb5aaf3dd..001ff2f521059405fac52659fe10229f127394ad 100644 (file)
@@ -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);
 
index 6afec33d418ae951c962b3ca5a1ee360e7d8d7e5..6dcde2523a7492732bd6b86b02f00011cb9e0794 100644 (file)
@@ -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
index 0aa85d90e89d449953c0c81e4ee1a6c39d76adf0..0e3e246bd2ce304a1a4179eb50be5c3ebe3fd08a 100644 (file)
@@ -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);
 
 /*
index ef182977bf9ac1cbd676e5cf1d58da61be8d85ee..18dc5f99a6b65093d45d46e0b3188621f5501b46 100644 (file)
@@ -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);
 
index 729c4c46c0d3a4c3bacac1962d1593ac516aaf70..98a1a84289072da0fec88107b491560501ae03ec 100644 (file)
@@ -249,7 +249,7 @@ extern void recordDependencyOnTablespace(Oid classId, Oid objectId,
 extern void changeDependencyOnTablespace(Oid classId, Oid objectId,
                                         Oid newTablespaceId);
 
-extern void updateAclDependencies(Oid classId, Oid objectId, int32 objectSubId,
+extern void updateAclDependencies(Oid classId, Oid objectId, int32 objsubId,
                                  Oid ownerId,
                                  int noldmembers, Oid *oldmembers,
                                  int nnewmembers, Oid *newmembers);
@@ -263,8 +263,8 @@ extern void copyTemplateDependencies(Oid templateDbId, Oid newDbId);
 
 extern void dropDatabaseDependencies(Oid databaseId);
 
-extern void shdepDropOwned(List *relids, DropBehavior behavior);
+extern void shdepDropOwned(List *roleids, DropBehavior behavior);
 
-extern void shdepReassignOwned(List *relids, Oid newrole);
+extern void shdepReassignOwned(List *roleids, Oid newrole);
 
 #endif                         /* DEPENDENCY_H */
index 1bdb00a5212de0bdb6d814d27385a4119cbdf6cc..91c28868d47aa6b9068e42c26f35a58fc725960d 100644 (file)
@@ -149,7 +149,7 @@ extern void index_set_state_flags(Oid indexId, IndexStateFlagsAction action);
 extern Oid IndexGetRelation(Oid indexId, bool missing_ok);
 
 extern void reindex_index(Oid indexId, bool skip_constraint_checks,
-                         char relpersistence, ReindexParams *params);
+                         char persistence, ReindexParams *params);
 
 /* Flag bits for reindex_relation(): */
 #define REINDEX_REL_PROCESS_TOAST          0x01
@@ -168,7 +168,7 @@ extern Size EstimateReindexStateSpace(void);
 extern void SerializeReindexState(Size maxsize, char *start_address);
 extern void RestoreReindexState(void *reindexstate);
 
-extern void IndexSetParentIndex(Relation idx, Oid parentOid);
+extern void IndexSetParentIndex(Relation partitionIdx, Oid parentOid);
 
 
 /*
index 1bc55c01a5c4591ea2ab227a61ba41add0c7eeae..2a2a2e6489e07c4115b29957593543d43f8a8743 100644 (file)
@@ -85,7 +85,7 @@ extern Oid    RangeVarGetRelidExtended(const RangeVar *relation,
                                     RangeVarGetRelidCallback callback,
                                     void *callback_arg);
 extern Oid RangeVarGetCreationNamespace(const RangeVar *newRelation);
-extern Oid RangeVarGetAndCheckCreationNamespace(RangeVar *newRelation,
+extern Oid RangeVarGetAndCheckCreationNamespace(RangeVar *relation,
                                                 LOCKMODE lockmode,
                                                 Oid *existing_relation_id);
 extern void RangeVarAdjustRelationPersistence(RangeVar *newRelation, Oid nspid);
index 567ab63e855d363c74ab2bbead67a7208b9a7e4e..d754f41202fe216d0a6193df447e2617a1ad60a3 100644 (file)
@@ -151,15 +151,15 @@ extern bool RunNamespaceSearchHook(Oid objectId, bool ereport_on_violation);
 extern void RunFunctionExecuteHook(Oid objectId);
 
 /* String versions */
-extern void RunObjectPostCreateHookStr(Oid classId, const char *objectStr, int subId,
+extern void RunObjectPostCreateHookStr(Oid classId, const char *objectName, int subId,
                                       bool is_internal);
-extern void RunObjectDropHookStr(Oid classId, const char *objectStr, int subId,
+extern void RunObjectDropHookStr(Oid classId, const char *objectName, int subId,
                                 int dropflags);
-extern void RunObjectTruncateHookStr(const char *objectStr);
-extern void RunObjectPostAlterHookStr(Oid classId, const char *objectStr, int subId,
+extern void RunObjectTruncateHookStr(const char *objectName);
+extern void RunObjectPostAlterHookStr(Oid classId, const char *objectName, int subId,
                                      Oid auxiliaryId, bool is_internal);
-extern bool RunNamespaceSearchHookStr(const char *objectStr, bool ereport_on_violation);
-extern void RunFunctionExecuteHookStr(const char *objectStr);
+extern bool RunNamespaceSearchHookStr(const char *objectName, bool ereport_on_violation);
+extern void RunFunctionExecuteHookStr(const char *objectName);
 
 
 /*
index cf4d8b3107717093d0f7edbec900a5775e23a298..340ffc95a0be47250d106a0bd9c9929d8d149e35 100644 (file)
@@ -77,9 +77,9 @@ extern char *getObjectDescriptionOids(Oid classid, Oid objid);
 extern int read_objtype_from_string(const char *objtype);
 extern char *getObjectTypeDescription(const ObjectAddress *object,
                                      bool missing_ok);
-extern char *getObjectIdentity(const ObjectAddress *address,
+extern char *getObjectIdentity(const ObjectAddress *object,
                               bool missing_ok);
-extern char *getObjectIdentityParts(const ObjectAddress *address,
+extern char *getObjectIdentityParts(const ObjectAddress *object,
                                    List **objname, List **objargs,
                                    bool missing_ok);
 extern struct ArrayType *strlist_to_textarray(List *list);
index fb26123aa90335e35616c2b02d39584e9dec7719..e59ed94ed3f712bc883b7c7c4eb16e681124198a 100644 (file)
@@ -69,7 +69,7 @@ extern ObjectAddress ConversionCreate(const char *conname, Oid connamespace,
                                      Oid conowner,
                                      int32 conforencoding, int32 contoencoding,
                                      Oid conproc, bool def);
-extern Oid FindDefaultConversion(Oid connamespace, int32 for_encoding,
+extern Oid FindDefaultConversion(Oid name_space, int32 for_encoding,
                                  int32 to_encoding);
 
 #endif                         /* PG_CONVERSION_H */
index b5a32755a629986937ebc1d56187f479833e2b01..9221c2ea577d4db9c5ed9d29292d40ef7d451354 100644 (file)
@@ -53,13 +53,14 @@ extern List *find_inheritance_children_extended(Oid parentrelId, bool omit_detac
                                                LOCKMODE lockmode, bool *detached_exist, TransactionId *detached_xmin);
 
 extern List *find_all_inheritors(Oid parentrelId, LOCKMODE lockmode,
-                                List **parents);
+                                List **numparents);
 extern bool has_subclass(Oid relationId);
 extern bool has_superclass(Oid relationId);
 extern bool typeInheritsFrom(Oid subclassTypeId, Oid superclassTypeId);
 extern void StoreSingleInheritance(Oid relationId, Oid parentOid,
                                   int32 seqNumber);
-extern bool DeleteInheritsTuple(Oid inhrelid, Oid inhparent, bool allow_detached,
+extern bool DeleteInheritsTuple(Oid inhrelid, Oid inhparent,
+                               bool expect_detach_pending,
                                const char *childname);
 extern bool PartitionHasPendingDetach(Oid partoid);
 
index c298327f5e5c9dd180f5db251e58ab5238f4617a..ecf5a28e00268ce62e1bd1c6fa440f36f2be5d50 100644 (file)
@@ -137,7 +137,7 @@ extern List *GetPublicationSchemas(Oid pubid);
 extern List *GetSchemaPublications(Oid schemaid);
 extern List *GetSchemaPublicationRelations(Oid schemaid,
                                           PublicationPartOpt pub_partopt);
-extern List *GetAllSchemaPublicationRelations(Oid puboid,
+extern List *GetAllSchemaPublicationRelations(Oid pubid,
                                              PublicationPartOpt pub_partopt);
 extern List *GetPubPartitionOptionRelations(List *result,
                                            PublicationPartOpt pub_partopt,
index cb0096aeb67440ebf25e83688bec2056596b9b3b..3f6677b1327ced7fdf5e0758cd259fceba120b2e 100644 (file)
@@ -67,11 +67,11 @@ typedef struct CopyToStateData *CopyToState;
 
 typedef int (*copy_data_source_cb) (void *outbuf, int minread, int maxread);
 
-extern void DoCopy(ParseState *state, const CopyStmt *stmt,
+extern void DoCopy(ParseState *pstate, const CopyStmt *stmt,
                   int stmt_location, int stmt_len,
                   uint64 *processed);
 
-extern void ProcessCopyOptions(ParseState *pstate, CopyFormatOptions *ops_out, bool is_from, List *options);
+extern void ProcessCopyOptions(ParseState *pstate, CopyFormatOptions *opts_out, bool is_from, List *options);
 extern CopyFromState BeginCopyFrom(ParseState *pstate, Relation rel, Node *whereClause,
                                   const char *filename,
                                   bool is_program, copy_data_source_cb data_source_cb, List *attnamelist, List *options);
@@ -89,7 +89,7 @@ extern DestReceiver *CreateCopyDestReceiver(void);
 /*
  * internal prototypes
  */
-extern CopyToState BeginCopyTo(ParseState *pstate, Relation rel, RawStmt *query,
+extern CopyToState BeginCopyTo(ParseState *pstate, Relation rel, RawStmt *raw_query,
                               Oid queryRelId, const char *filename, bool is_program,
                               List *attnamelist, List *options);
 extern void EndCopyTo(CopyToState cstate);
index 0ee2452febacc112b5cdf7453701a27dc0c4dc7b..545e5430cc3a37bebc442cecaefc6fac04a3a999 100644 (file)
@@ -53,8 +53,8 @@ typedef struct xl_dbase_drop_rec
 } xl_dbase_drop_rec;
 #define MinSizeOfDbaseDropRec offsetof(xl_dbase_drop_rec, tablespace_ids)
 
-extern void dbase_redo(XLogReaderState *rptr);
-extern void dbase_desc(StringInfo buf, XLogReaderState *rptr);
+extern void dbase_redo(XLogReaderState *record);
+extern void dbase_desc(StringInfo buf, XLogReaderState *record);
 extern const char *dbase_identify(uint8 info);
 
 #endif                         /* DBCOMMANDS_XLOG_H */
index 3a1b11326f870265e7e8d7d1868db1b9713e20de..955d0bd64dceb055018906b886854bcd2d327b6c 100644 (file)
@@ -38,13 +38,13 @@ typedef struct ParallelExecutorInfo
 } ParallelExecutorInfo;
 
 extern ParallelExecutorInfo *ExecInitParallelPlan(PlanState *planstate,
-                                                 EState *estate, Bitmapset *sendParam, int nworkers,
+                                                 EState *estate, Bitmapset *sendParams, int nworkers,
                                                  int64 tuples_needed);
 extern void ExecParallelCreateReaders(ParallelExecutorInfo *pei);
 extern void ExecParallelFinish(ParallelExecutorInfo *pei);
 extern void ExecParallelCleanup(ParallelExecutorInfo *pei);
 extern void ExecParallelReinitialize(PlanState *planstate,
-                                    ParallelExecutorInfo *pei, Bitmapset *sendParam);
+                                    ParallelExecutorInfo *pei, Bitmapset *sendParams);
 
 extern void ParallelQueryMain(dsm_segment *seg, shm_toc *toc);
 
index a91c472a0d9a7ba1e49fdff0a02fe4755015e4af..ed95ed1176da9dfb7e3e8b3eb7c114bd4b77e72c 100644 (file)
@@ -218,7 +218,7 @@ extern LockTupleMode ExecUpdateLockMode(EState *estate, ResultRelInfo *relinfo);
 extern ExecRowMark *ExecFindRowMark(EState *estate, Index rti, bool missing_ok);
 extern ExecAuxRowMark *ExecBuildAuxRowMark(ExecRowMark *erm, List *targetlist);
 extern TupleTableSlot *EvalPlanQual(EPQState *epqstate, Relation relation,
-                                   Index rti, TupleTableSlot *testslot);
+                                   Index rti, TupleTableSlot *inputslot);
 extern void EvalPlanQualInit(EPQState *epqstate, EState *parentestate,
                             Plan *subplan, List *auxrowmarks, int epqParam);
 extern void EvalPlanQualSetPlan(EPQState *epqstate,
@@ -432,7 +432,7 @@ ExecQualAndReset(ExprState *state, ExprContext *econtext)
 }
 #endif
 
-extern bool ExecCheck(ExprState *state, ExprContext *context);
+extern bool ExecCheck(ExprState *state, ExprContext *econtext);
 
 /*
  * prototypes from functions in execSRF.c
@@ -473,7 +473,7 @@ extern void ExecInitResultSlot(PlanState *planstate,
 extern void ExecInitResultTupleSlotTL(PlanState *planstate,
                                      const TupleTableSlotOps *tts_ops);
 extern void ExecInitScanTupleSlot(EState *estate, ScanState *scanstate,
-                                 TupleDesc tupleDesc,
+                                 TupleDesc tupledesc,
                                  const TupleTableSlotOps *tts_ops);
 extern TupleTableSlot *ExecInitExtraTupleSlot(EState *estate,
                                              TupleDesc tupledesc,
index 84cfd96b13425b8f1919ac8ada19d518d04792b2..519d955951b3583443e8b3e231a35b56b1d9feff 100644 (file)
@@ -22,7 +22,7 @@ extern void ExecReScanIncrementalSort(IncrementalSortState *node);
 /* parallel instrumentation support */
 extern void ExecIncrementalSortEstimate(IncrementalSortState *node, ParallelContext *pcxt);
 extern void ExecIncrementalSortInitializeDSM(IncrementalSortState *node, ParallelContext *pcxt);
-extern void ExecIncrementalSortInitializeWorker(IncrementalSortState *node, ParallelWorkerContext *pcxt);
+extern void ExecIncrementalSortInitializeWorker(IncrementalSortState *node, ParallelWorkerContext *pwcxt);
 extern void ExecIncrementalSortRetrieveInstrumentation(IncrementalSortState *node);
 
 #endif                         /* NODEINCREMENTALSORT_H */
index b2c0c7486ce45a0393e661001594b746dbd10c03..697abe5fc9d82f9b0bf6c1f9f90dbb57591ce072 100644 (file)
@@ -174,7 +174,7 @@ extern void *SPI_palloc(Size size);
 extern void *SPI_repalloc(void *pointer, Size size);
 extern void SPI_pfree(void *pointer);
 extern Datum SPI_datumTransfer(Datum value, bool typByVal, int typLen);
-extern void SPI_freetuple(HeapTuple pointer);
+extern void SPI_freetuple(HeapTuple tuple);
 extern void SPI_freetuptable(SPITupleTable *tuptable);
 
 extern Portal SPI_cursor_open(const char *name, SPIPlanPtr plan,
index 1e8c3af36019c34e378c93e438b0a954d7cea5ee..4f2643742e1ee84878a042f49cc9d6c0af9a39f2 100644 (file)
@@ -606,11 +606,11 @@ extern int    pg_encoding_wchar2mb_with_len(int encoding,
 extern int pg_char_and_wchar_strcmp(const char *s1, const pg_wchar *s2);
 extern int pg_wchar_strncmp(const pg_wchar *s1, const pg_wchar *s2, size_t n);
 extern int pg_char_and_wchar_strncmp(const char *s1, const pg_wchar *s2, size_t n);
-extern size_t pg_wchar_strlen(const pg_wchar *wstr);
+extern size_t pg_wchar_strlen(const pg_wchar *str);
 extern int pg_mblen(const char *mbstr);
 extern int pg_dsplen(const char *mbstr);
 extern int pg_mbstrlen(const char *mbstr);
-extern int pg_mbstrlen_with_len(const char *mbstr, int len);
+extern int pg_mbstrlen_with_len(const char *mbstr, int limit);
 extern int pg_mbcliplen(const char *mbstr, int len, int limit);
 extern int pg_encoding_mbcliplen(int encoding, const char *mbstr,
                                  int len, int limit);
@@ -641,7 +641,7 @@ extern int  pg_do_encoding_conversion_buf(Oid proc,
                                          int src_encoding,
                                          int dest_encoding,
                                          unsigned char *src, int srclen,
-                                         unsigned char *dst, int dstlen,
+                                         unsigned char *dest, int destlen,
                                          bool noError);
 
 extern char *pg_client_to_server(const char *s, int len);
index 65cf4ba50f37580c41a87fcaef6993c51f6e222b..ee48e392ed795a9dc8b994cfd55ea17284bec684 100644 (file)
@@ -352,7 +352,7 @@ extern bool InSecurityRestrictedOperation(void);
 extern bool InNoForceRLSOperation(void);
 extern void GetUserIdAndContext(Oid *userid, bool *sec_def_context);
 extern void SetUserIdAndContext(Oid userid, bool sec_def_context);
-extern void InitializeSessionUserId(const char *rolename, Oid useroid);
+extern void InitializeSessionUserId(const char *rolename, Oid roleid);
 extern void InitializeSessionUserIdStandalone(void);
 extern void SetSessionAuthorization(Oid userid, bool is_superuser);
 extern Oid GetCurrentRoleId(void);
index edadacd58936aae5ffe66c54687cb8a34a5e2308..4ad019e25a2995b127b4f8d3191610a88f0b59dd 100644 (file)
@@ -133,7 +133,8 @@ extern void DecodingContextFindStartpoint(LogicalDecodingContext *ctx);
 extern bool DecodingContextReady(LogicalDecodingContext *ctx);
 extern void FreeDecodingContext(LogicalDecodingContext *ctx);
 
-extern void LogicalIncreaseXminForSlot(XLogRecPtr lsn, TransactionId xmin);
+extern void LogicalIncreaseXminForSlot(XLogRecPtr current_lsn,
+                                      TransactionId xmin);
 extern void LogicalIncreaseRestartDecodingForSlot(XLogRecPtr current_lsn,
                                                  XLogRecPtr restart_lsn);
 extern void LogicalConfirmReceivedLocation(XLogRecPtr lsn);
index a771ab8ff3356ee5d2798e6bdd867164c528eea6..7eaa4c97eda9cabf37e633515f153d9f81e81447 100644 (file)
@@ -219,7 +219,7 @@ extern LogicalRepRelId logicalrep_read_update(StringInfo in,
                                              bool *has_oldtuple, LogicalRepTupleData *oldtup,
                                              LogicalRepTupleData *newtup);
 extern void logicalrep_write_delete(StringInfo out, TransactionId xid,
-                                   Relation rel, TupleTableSlot *oldtuple,
+                                   Relation rel, TupleTableSlot *oldslot,
                                    bool binary);
 extern LogicalRepRelId logicalrep_read_delete(StringInfo in,
                                              LogicalRepTupleData *oldtup);
@@ -235,7 +235,7 @@ extern void logicalrep_write_rel(StringInfo out, TransactionId xid,
 extern LogicalRepRelation *logicalrep_read_rel(StringInfo in);
 extern void logicalrep_write_typ(StringInfo out, TransactionId xid,
                                 Oid typoid);
-extern void logicalrep_read_typ(StringInfo out, LogicalRepTyp *ltyp);
+extern void logicalrep_read_typ(StringInfo in, LogicalRepTyp *ltyp);
 extern void logicalrep_write_stream_start(StringInfo out, TransactionId xid,
                                          bool first_segment);
 extern TransactionId logicalrep_read_stream_start(StringInfo in,
@@ -243,7 +243,7 @@ extern TransactionId logicalrep_read_stream_start(StringInfo in,
 extern void logicalrep_write_stream_stop(StringInfo out);
 extern void logicalrep_write_stream_commit(StringInfo out, ReorderBufferTXN *txn,
                                           XLogRecPtr commit_lsn);
-extern TransactionId logicalrep_read_stream_commit(StringInfo out,
+extern TransactionId logicalrep_read_stream_commit(StringInfo in,
                                                   LogicalRepCommitData *commit_data);
 extern void logicalrep_write_stream_abort(StringInfo out, TransactionId xid,
                                          TransactionId subxid);
index 2d1b5e5c28cbaab87dfecb7bf6a394a0c9636801..2a50d10b524e7f2043dbd0bf9b971a362857c3cd 100644 (file)
@@ -38,8 +38,8 @@ extern PGDLLIMPORT XLogRecPtr replorigin_session_origin_lsn;
 extern PGDLLIMPORT TimestampTz replorigin_session_origin_timestamp;
 
 /* API for querying & manipulating replication origins */
-extern RepOriginId replorigin_by_name(const char *name, bool missing_ok);
-extern RepOriginId replorigin_create(const char *name);
+extern RepOriginId replorigin_by_name(const char *roname, bool missing_ok);
+extern RepOriginId replorigin_create(const char *roname);
 extern void replorigin_drop_by_name(const char *name, bool missing_ok, bool nowait);
 extern bool replorigin_by_oid(RepOriginId roident, bool missing_ok,
                              char **roname);
index 8c9f3321d50d625f3532600683d1211b87ce0b6b..81e31f002a3763521e6236e8fa12fe6cb4ed629a 100644 (file)
@@ -195,7 +195,8 @@ extern void ReplicationSlotsShmemInit(void);
 
 /* management of individual slots */
 extern void ReplicationSlotCreate(const char *name, bool db_specific,
-                                 ReplicationSlotPersistency p, bool two_phase);
+                                 ReplicationSlotPersistency persistency,
+                                 bool two_phase);
 extern void ReplicationSlotPersist(void);
 extern void ReplicationSlotDrop(const char *name, bool nowait);
 
index d99a21b0771832bc15e7059a1273b570ea284767..8336a6e7198550eb35361f824587dbd4175f3730 100644 (file)
@@ -36,7 +36,7 @@ extern PGDLLIMPORT int wal_sender_timeout;
 extern PGDLLIMPORT bool log_replication_commands;
 
 extern void InitWalSender(void);
-extern bool exec_replication_command(const char *query_string);
+extern bool exec_replication_command(const char *cmd_string);
 extern void WalSndErrorCleanup(void);
 extern void WalSndResourceCleanup(bool isCommit);
 extern void WalSndSignals(void);
index 57d2c52e79bfb35d4a5bd3838fd48cdc40726a9d..4b16ab812d225094a332aac733fee590ec1dd97c 100644 (file)
@@ -34,7 +34,7 @@ typedef struct Barrier
    ConditionVariable condition_variable;
 } Barrier;
 
-extern void BarrierInit(Barrier *barrier, int num_workers);
+extern void BarrierInit(Barrier *barrier, int participants);
 extern bool BarrierArriveAndWait(Barrier *barrier, uint32 wait_event_info);
 extern bool BarrierArriveAndDetach(Barrier *barrier);
 extern bool BarrierArriveAndDetachExceptLast(Barrier *barrier);
index 6a947021aca2c75ff187ebad6f608b6c23f9dd20..2708c4b683d35483cf77418850280e3736ae7f20 100644 (file)
@@ -499,9 +499,9 @@ extern Size PageGetFreeSpace(Page page);
 extern Size PageGetFreeSpaceForMultipleTuples(Page page, int ntups);
 extern Size PageGetExactFreeSpace(Page page);
 extern Size PageGetHeapFreeSpace(Page page);
-extern void PageIndexTupleDelete(Page page, OffsetNumber offset);
+extern void PageIndexTupleDelete(Page page, OffsetNumber offnum);
 extern void PageIndexMultiDelete(Page page, OffsetNumber *itemnos, int nitems);
-extern void PageIndexTupleDeleteNoCompact(Page page, OffsetNumber offset);
+extern void PageIndexTupleDeleteNoCompact(Page page, OffsetNumber offnum);
 extern bool PageIndexTupleOverwrite(Page page, OffsetNumber offnum,
                                    Item newtup, Size newsize);
 extern char *PageSetChecksumCopy(Page page, BlockNumber blkno);
index 4dd6af23a89a5e3c89a55ef5b34411015e3ba1ef..edb32fe99605970adaf2dc25649bdc9b511d44d6 100644 (file)
@@ -45,8 +45,8 @@ extern void dsm_detach(dsm_segment *seg);
 extern void dsm_pin_mapping(dsm_segment *seg);
 extern void dsm_unpin_mapping(dsm_segment *seg);
 extern void dsm_pin_segment(dsm_segment *seg);
-extern void dsm_unpin_segment(dsm_handle h);
-extern dsm_segment *dsm_find_mapping(dsm_handle h);
+extern void dsm_unpin_segment(dsm_handle handle);
+extern dsm_segment *dsm_find_mapping(dsm_handle handle);
 
 /* Informational functions. */
 extern void *dsm_segment_address(dsm_segment *seg);
index 2b4a8e0ffe87e85e093c6149e067042f1f57a6ec..5a48fccd9c203d6e389b759c212e61b294f7593c 100644 (file)
@@ -117,11 +117,11 @@ extern int    FileGetRawFlags(File file);
 extern mode_t FileGetRawMode(File file);
 
 /* Operations used for sharing named temporary files */
-extern File PathNameCreateTemporaryFile(const char *name, bool error_on_failure);
+extern File PathNameCreateTemporaryFile(const char *path, bool error_on_failure);
 extern File PathNameOpenTemporaryFile(const char *path, int mode);
-extern bool PathNameDeleteTemporaryFile(const char *name, bool error_on_failure);
-extern void PathNameCreateTemporaryDir(const char *base, const char *name);
-extern void PathNameDeleteTemporaryDir(const char *name);
+extern bool PathNameDeleteTemporaryFile(const char *path, bool error_on_failure);
+extern void PathNameCreateTemporaryDir(const char *basedir, const char *directory);
+extern void PathNameDeleteTemporaryDir(const char *dirname);
 extern void TempTablespacePath(char *path, Oid tablespace);
 
 /* Operations that allow use of regular stdio --- USE WITH CAUTION */
@@ -177,7 +177,7 @@ extern int  pg_fsync(int fd);
 extern int pg_fsync_no_writethrough(int fd);
 extern int pg_fsync_writethrough(int fd);
 extern int pg_fdatasync(int fd);
-extern void pg_flush_data(int fd, off_t offset, off_t amount);
+extern void pg_flush_data(int fd, off_t offset, off_t nbytes);
 extern ssize_t pg_pwritev_with_retry(int fd,
                                     const struct iovec *iov,
                                     int iovcnt,
@@ -185,8 +185,8 @@ extern ssize_t pg_pwritev_with_retry(int fd,
 extern int pg_truncate(const char *path, off_t length);
 extern void fsync_fname(const char *fname, bool isdir);
 extern int fsync_fname_ext(const char *fname, bool isdir, bool ignore_perm, int elevel);
-extern int durable_rename(const char *oldfile, const char *newfile, int loglevel);
-extern int durable_unlink(const char *fname, int loglevel);
+extern int durable_rename(const char *oldfile, const char *newfile, int elevel);
+extern int durable_unlink(const char *fname, int elevel);
 extern void SyncDataDirectory(void);
 extern int data_sync_elevel(int elevel);
 
index a6f837217d7d2fef2249090f57b54bf629fdf0c3..819160c78948fb32d94d691984ea163027f80011 100644 (file)
@@ -61,7 +61,7 @@ typedef FSMPageData *FSMPage;
 #define SlotsPerFSMPage LeafNodesPerPage
 
 /* Prototypes for functions in fsmpage.c */
-extern int fsm_search_avail(Buffer buf, uint8 min_cat, bool advancenext,
+extern int fsm_search_avail(Buffer buf, uint8 minvalue, bool advancenext,
                             bool exclusive_lock_held);
 extern uint8 fsm_get_avail(Page page, int slot);
 extern uint8 fsm_get_max_avail(Page page);
index 04c1a051b255cce0303a97e087b68526d9e0d3c1..129590863f382b572a0f85b907b955acd8bce9bf 100644 (file)
@@ -18,8 +18,8 @@
 #include "utils/relcache.h"
 
 extern BlockNumber GetFreeIndexPage(Relation rel);
-extern void RecordFreeIndexPage(Relation rel, BlockNumber page);
-extern void RecordUsedIndexPage(Relation rel, BlockNumber page);
+extern void RecordFreeIndexPage(Relation rel, BlockNumber freeBlock);
+extern void RecordUsedIndexPage(Relation rel, BlockNumber usedBlock);
 
 extern void IndexFreeSpaceMapVacuum(Relation rel);
 
index e03d317eeac744a5ca2fe18992b3572619e59bad..ca4eca76f4183989a20f98ea0d85c3e71bf3c8bf 100644 (file)
@@ -124,7 +124,7 @@ extern bool LWLockAnyHeldByMe(LWLock *lock, int nlocks, size_t stride);
 extern bool LWLockHeldByMeInMode(LWLock *lock, LWLockMode mode);
 
 extern bool LWLockWaitForVar(LWLock *lock, uint64 *valptr, uint64 oldval, uint64 *newval);
-extern void LWLockUpdateVar(LWLock *lock, uint64 *valptr, uint64 value);
+extern void LWLockUpdateVar(LWLock *lock, uint64 *valptr, uint64 val);
 
 extern Size LWLockShmemSize(void);
 extern void CreateLWLocks(void);
index 8dfcb3944b4fdb9883b00adb4e4a935dcb33dbf0..dbef2ffb010297c8e2ec9b7d0f4d564dd2073a9f 100644 (file)
@@ -58,7 +58,7 @@ extern void RegisterPredicateLockingXid(TransactionId xid);
 extern void PredicateLockRelation(Relation relation, Snapshot snapshot);
 extern void PredicateLockPage(Relation relation, BlockNumber blkno, Snapshot snapshot);
 extern void PredicateLockTID(Relation relation, ItemPointer tid, Snapshot snapshot,
-                            TransactionId insert_xid);
+                            TransactionId tuple_xid);
 extern void PredicateLockPageSplit(Relation relation, BlockNumber oldblkno, BlockNumber newblkno);
 extern void PredicateLockPageCombine(Relation relation, BlockNumber oldblkno, BlockNumber newblkno);
 extern void TransferPredicateLocksToHeapRelation(Relation relation);
index 1b2cfac5ad0ad608dceda07c1d770e048f2d7307..9761f5374c4003a6c4af943f53abb0ef89bae27e 100644 (file)
@@ -57,7 +57,7 @@ extern TransactionId GetOldestNonRemovableTransactionId(Relation rel);
 extern TransactionId GetOldestTransactionIdConsideredRunning(void);
 extern TransactionId GetOldestActiveTransactionId(void);
 extern TransactionId GetOldestSafeDecodingTransactionId(bool catalogOnly);
-extern void GetReplicationHorizons(TransactionId *slot_xmin, TransactionId *catalog_xmin);
+extern void GetReplicationHorizons(TransactionId *xmin, TransactionId *catalog_xmin);
 
 extern VirtualTransactionId *GetVirtualXIDsDelayingChkpt(int *nvxids, int type);
 extern bool HaveVirtualXIDsDelayingChkpt(VirtualTransactionId *vxids,
index dacef92f44a42ae91a69d0c3e1e81db2fa5ed6c4..f5da98dc73626285d9cd67ead7d4452184b89b8a 100644 (file)
@@ -43,7 +43,7 @@ extern void StandbyDeadLockHandler(void);
 extern void StandbyTimeoutHandler(void);
 extern void StandbyLockTimeoutHandler(void);
 extern void LogRecoveryConflict(ProcSignalReason reason, TimestampTz wait_start,
-                               TimestampTz cur_ts, VirtualTransactionId *wait_list,
+                               TimestampTz now, VirtualTransactionId *wait_list,
                                bool still_waiting);
 
 /*