aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2022-05-12 09:19:04 -0700
committerAndres Freund <andres@anarazel.de>2022-05-12 12:39:33 -0700
commit09cd33f47bb32f904c32b5aabe607a5125159cc4 (patch)
tree4d2cdd2622cda583543546694ae2212b8a131294
parent905c020bef99e16b37529203084cd93932e73805 (diff)
downloadpostgresql-09cd33f47bb32f904c32b5aabe607a5125159cc4.tar.gz
postgresql-09cd33f47bb32f904c32b5aabe607a5125159cc4.zip
Add 'static' to file-local variables missing it.
Noticed when comparing the set of exported symbols without / with -fvisibility=hidden after adding PGDLLIMPORT to intentionally exported symbols. Discussion: https://postgr.es/m/20220512164513.vaheofqp2q24l65r@alap3.anarazel.de
-rw-r--r--src/backend/access/common/reloptions.c6
-rw-r--r--src/backend/access/transam/commit_ts.c2
-rw-r--r--src/backend/access/transam/xact.c6
-rw-r--r--src/backend/catalog/storage.c2
-rw-r--r--src/backend/replication/logical/launcher.c2
-rw-r--r--src/backend/replication/logical/tablesync.c2
-rw-r--r--src/backend/replication/logical/worker.c2
-rw-r--r--src/backend/tcop/cmdtag.c2
8 files changed, 12 insertions, 12 deletions
diff --git a/src/backend/access/common/reloptions.c b/src/backend/access/common/reloptions.c
index 599e160ca64..24211807ca1 100644
--- a/src/backend/access/common/reloptions.c
+++ b/src/backend/access/common/reloptions.c
@@ -475,7 +475,7 @@ static relopt_real realRelOpts[] =
};
/* values from StdRdOptIndexCleanup */
-relopt_enum_elt_def StdRdOptIndexCleanupValues[] =
+static relopt_enum_elt_def StdRdOptIndexCleanupValues[] =
{
{"auto", STDRD_OPTION_VACUUM_INDEX_CLEANUP_AUTO},
{"on", STDRD_OPTION_VACUUM_INDEX_CLEANUP_ON},
@@ -490,7 +490,7 @@ relopt_enum_elt_def StdRdOptIndexCleanupValues[] =
};
/* values from GistOptBufferingMode */
-relopt_enum_elt_def gistBufferingOptValues[] =
+static relopt_enum_elt_def gistBufferingOptValues[] =
{
{"auto", GIST_OPTION_BUFFERING_AUTO},
{"on", GIST_OPTION_BUFFERING_ON},
@@ -499,7 +499,7 @@ relopt_enum_elt_def gistBufferingOptValues[] =
};
/* values from ViewOptCheckOption */
-relopt_enum_elt_def viewCheckOptValues[] =
+static relopt_enum_elt_def viewCheckOptValues[] =
{
/* no value for NOT_SET */
{"local", VIEW_OPTION_CHECK_OPTION_LOCAL},
diff --git a/src/backend/access/transam/commit_ts.c b/src/backend/access/transam/commit_ts.c
index 20950eb1e4a..4dc8d402bd3 100644
--- a/src/backend/access/transam/commit_ts.c
+++ b/src/backend/access/transam/commit_ts.c
@@ -98,7 +98,7 @@ typedef struct CommitTimestampShared
bool commitTsActive;
} CommitTimestampShared;
-CommitTimestampShared *commitTsShared;
+static CommitTimestampShared *commitTsShared;
/* GUC variable */
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index 53f3e7fd1a6..47d80b0d257 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -121,9 +121,9 @@ bool bsysscan = false;
* The XIDs are stored sorted in numerical order (not logical order) to make
* lookups as fast as possible.
*/
-FullTransactionId XactTopFullTransactionId = {InvalidTransactionId};
-int nParallelCurrentXids = 0;
-TransactionId *ParallelCurrentXids;
+static FullTransactionId XactTopFullTransactionId = {InvalidTransactionId};
+static int nParallelCurrentXids = 0;
+static TransactionId *ParallelCurrentXids;
/*
* Miscellaneous flag bits to record events which occur on the top level
diff --git a/src/backend/catalog/storage.c b/src/backend/catalog/storage.c
index cd31e68e95e..c06e414a38f 100644
--- a/src/backend/catalog/storage.c
+++ b/src/backend/catalog/storage.c
@@ -73,7 +73,7 @@ typedef struct PendingRelSync
} PendingRelSync;
static PendingRelDelete *pendingDeletes = NULL; /* head of linked list */
-HTAB *pendingSyncHash = NULL;
+static HTAB *pendingSyncHash = NULL;
/*
diff --git a/src/backend/replication/logical/launcher.c b/src/backend/replication/logical/launcher.c
index 6a4b2d43063..eabcc1bcba7 100644
--- a/src/backend/replication/logical/launcher.c
+++ b/src/backend/replication/logical/launcher.c
@@ -65,7 +65,7 @@ typedef struct LogicalRepCtxStruct
LogicalRepWorker workers[FLEXIBLE_ARRAY_MEMBER];
} LogicalRepCtxStruct;
-LogicalRepCtxStruct *LogicalRepCtx;
+static LogicalRepCtxStruct *LogicalRepCtx;
static void ApplyLauncherWakeup(void);
static void logicalrep_launcher_onexit(int code, Datum arg);
diff --git a/src/backend/replication/logical/tablesync.c b/src/backend/replication/logical/tablesync.c
index 61aee61b8ee..b03e0f5aac2 100644
--- a/src/backend/replication/logical/tablesync.c
+++ b/src/backend/replication/logical/tablesync.c
@@ -124,7 +124,7 @@ static bool table_states_valid = false;
static List *table_states_not_ready = NIL;
static bool FetchTableStates(bool *started_tx);
-StringInfo copybuf = NULL;
+static StringInfo copybuf = NULL;
/*
* Exit routine for synchronization worker.
diff --git a/src/backend/replication/logical/worker.c b/src/backend/replication/logical/worker.c
index 725a21b55ec..3b80ed92c07 100644
--- a/src/backend/replication/logical/worker.c
+++ b/src/backend/replication/logical/worker.c
@@ -251,7 +251,7 @@ static MemoryContext LogicalStreamingContext = NULL;
WalReceiverConn *LogRepWorkerWalRcvConn = NULL;
Subscription *MySubscription = NULL;
-bool MySubscriptionValid = false;
+static bool MySubscriptionValid = false;
bool in_remote_transaction = false;
static XLogRecPtr remote_final_lsn = InvalidXLogRecPtr;
diff --git a/src/backend/tcop/cmdtag.c b/src/backend/tcop/cmdtag.c
index a83bab14f4c..262484f561f 100644
--- a/src/backend/tcop/cmdtag.c
+++ b/src/backend/tcop/cmdtag.c
@@ -28,7 +28,7 @@ typedef struct CommandTagBehavior
#define PG_CMDTAG(tag, name, evtrgok, rwrok, rowcnt) \
{ name, evtrgok, rwrok, rowcnt },
-const CommandTagBehavior tag_behavior[COMMAND_TAG_NEXTTAG] = {
+static const CommandTagBehavior tag_behavior[COMMAND_TAG_NEXTTAG] = {
#include "tcop/cmdtaglist.h"
};