summaryrefslogtreecommitdiff
path: root/src/include/replication
diff options
context:
space:
mode:
authorRobert Haas2022-04-08 12:16:38 +0000
committerRobert Haas2022-04-08 12:16:38 +0000
commit8ec569479fc28ddd634a13dc100b36352ec3a3c2 (patch)
tree2cde3957ed4071478d647c305161eb24df35be15 /src/include/replication
parent80900d4690916a30f278d877eb5a7a42b14c3f0a (diff)
Apply PGDLLIMPORT markings broadly.
Up until now, we've had a policy of only marking certain variables in the PostgreSQL header files with PGDLLIMPORT, but now we've decided to mark them all. This means that extensions running on Windows should no longer operate at a disadvantage as compared to extensions running on Linux: if the variable is present in a header file, it should be accessible. Discussion: http://postgr.es/m/CA+TgmoYanc1_FSfimhgiWSqVyP5KKmh5NP2BWNwDhO8Pg2vGYQ@mail.gmail.com
Diffstat (limited to 'src/include/replication')
-rw-r--r--src/include/replication/logicallauncher.h4
-rw-r--r--src/include/replication/syncrep.h8
-rw-r--r--src/include/replication/walreceiver.h8
-rw-r--r--src/include/replication/walsender.h14
-rw-r--r--src/include/replication/walsender_private.h6
-rw-r--r--src/include/replication/worker_internal.h10
6 files changed, 25 insertions, 25 deletions
diff --git a/src/include/replication/logicallauncher.h b/src/include/replication/logicallauncher.h
index 15596fe446e..f1e2821e254 100644
--- a/src/include/replication/logicallauncher.h
+++ b/src/include/replication/logicallauncher.h
@@ -12,8 +12,8 @@
#ifndef LOGICALLAUNCHER_H
#define LOGICALLAUNCHER_H
-extern int max_logical_replication_workers;
-extern int max_sync_workers_per_subscription;
+extern PGDLLIMPORT int max_logical_replication_workers;
+extern PGDLLIMPORT int max_sync_workers_per_subscription;
extern void ApplyLauncherRegister(void);
extern void ApplyLauncherMain(Datum main_arg);
diff --git a/src/include/replication/syncrep.h b/src/include/replication/syncrep.h
index 27be230d779..4d7c90b9f0d 100644
--- a/src/include/replication/syncrep.h
+++ b/src/include/replication/syncrep.h
@@ -72,14 +72,14 @@ typedef struct SyncRepConfigData
char member_names[FLEXIBLE_ARRAY_MEMBER];
} SyncRepConfigData;
-extern SyncRepConfigData *SyncRepConfig;
+extern PGDLLIMPORT SyncRepConfigData *SyncRepConfig;
/* communication variables for parsing synchronous_standby_names GUC */
-extern SyncRepConfigData *syncrep_parse_result;
-extern char *syncrep_parse_error_msg;
+extern PGDLLIMPORT SyncRepConfigData *syncrep_parse_result;
+extern PGDLLIMPORT char *syncrep_parse_error_msg;
/* user-settable parameters for synchronous replication */
-extern char *SyncRepStandbyNames;
+extern PGDLLIMPORT char *SyncRepStandbyNames;
/* called by user backend */
extern void SyncRepWaitForLSN(XLogRecPtr lsn, bool commit);
diff --git a/src/include/replication/walreceiver.h b/src/include/replication/walreceiver.h
index 92f73a55b8d..81184aa92f3 100644
--- a/src/include/replication/walreceiver.h
+++ b/src/include/replication/walreceiver.h
@@ -25,9 +25,9 @@
#include "utils/tuplestore.h"
/* user-settable parameters */
-extern int wal_receiver_status_interval;
-extern int wal_receiver_timeout;
-extern bool hot_standby_feedback;
+extern PGDLLIMPORT int wal_receiver_status_interval;
+extern PGDLLIMPORT int wal_receiver_timeout;
+extern PGDLLIMPORT bool hot_standby_feedback;
/*
* MAXCONNINFO: maximum size of a connection string.
@@ -160,7 +160,7 @@ typedef struct
sig_atomic_t force_reply; /* used as a bool */
} WalRcvData;
-extern WalRcvData *WalRcv;
+extern PGDLLIMPORT WalRcvData *WalRcv;
typedef struct
{
diff --git a/src/include/replication/walsender.h b/src/include/replication/walsender.h
index b1892e9e4be..d99a21b0771 100644
--- a/src/include/replication/walsender.h
+++ b/src/include/replication/walsender.h
@@ -25,15 +25,15 @@ typedef enum
} CRSSnapshotAction;
/* global state */
-extern bool am_walsender;
-extern bool am_cascading_walsender;
-extern bool am_db_walsender;
-extern bool wake_wal_senders;
+extern PGDLLIMPORT bool am_walsender;
+extern PGDLLIMPORT bool am_cascading_walsender;
+extern PGDLLIMPORT bool am_db_walsender;
+extern PGDLLIMPORT bool wake_wal_senders;
/* user-settable parameters */
-extern int max_wal_senders;
-extern int wal_sender_timeout;
-extern bool log_replication_commands;
+extern PGDLLIMPORT int max_wal_senders;
+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);
diff --git a/src/include/replication/walsender_private.h b/src/include/replication/walsender_private.h
index 9631047c6c1..c14888e493f 100644
--- a/src/include/replication/walsender_private.h
+++ b/src/include/replication/walsender_private.h
@@ -80,7 +80,7 @@ typedef struct WalSnd
TimestampTz replyTime;
} WalSnd;
-extern WalSnd *MyWalSnd;
+extern PGDLLIMPORT WalSnd *MyWalSnd;
/* There is one WalSndCtl struct for the whole database cluster */
typedef struct
@@ -107,7 +107,7 @@ typedef struct
WalSnd walsnds[FLEXIBLE_ARRAY_MEMBER];
} WalSndCtlData;
-extern WalSndCtlData *WalSndCtl;
+extern PGDLLIMPORT WalSndCtlData *WalSndCtl;
extern void WalSndSetState(WalSndState state);
@@ -123,6 +123,6 @@ extern void replication_scanner_init(const char *query_string);
extern void replication_scanner_finish(void);
extern bool replication_scanner_is_replication_command(void);
-extern Node *replication_parse_result;
+extern PGDLLIMPORT Node *replication_parse_result;
#endif /* _WALSENDER_PRIVATE_H */
diff --git a/src/include/replication/worker_internal.h b/src/include/replication/worker_internal.h
index 3c3f5f6a3a0..4485d4ebee1 100644
--- a/src/include/replication/worker_internal.h
+++ b/src/include/replication/worker_internal.h
@@ -69,16 +69,16 @@ typedef struct LogicalRepWorker
} LogicalRepWorker;
/* Main memory context for apply worker. Permanent during worker lifetime. */
-extern MemoryContext ApplyContext;
+extern PGDLLIMPORT MemoryContext ApplyContext;
/* libpqreceiver connection */
-extern struct WalReceiverConn *LogRepWorkerWalRcvConn;
+extern PGDLLIMPORT struct WalReceiverConn *LogRepWorkerWalRcvConn;
/* Worker and subscription objects. */
-extern Subscription *MySubscription;
-extern LogicalRepWorker *MyLogicalRepWorker;
+extern PGDLLIMPORT Subscription *MySubscription;
+extern PGDLLIMPORT LogicalRepWorker *MyLogicalRepWorker;
-extern bool in_remote_transaction;
+extern PGDLLIMPORT bool in_remote_transaction;
extern void logicalrep_worker_attach(int slot);
extern LogicalRepWorker *logicalrep_worker_find(Oid subid, Oid relid,