mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
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
This commit is contained in:
@ -68,7 +68,7 @@ typedef char GinTernaryValue;
|
||||
|
||||
/* GUC parameters */
|
||||
extern PGDLLIMPORT int GinFuzzySearchLimit;
|
||||
extern int gin_pending_list_limit;
|
||||
extern PGDLLIMPORT int gin_pending_list_limit;
|
||||
|
||||
/* ginutil.c */
|
||||
extern void ginGetStats(Relation index, GinStatsData *stats);
|
||||
|
@ -54,7 +54,7 @@ typedef struct ParallelWorkerContext
|
||||
shm_toc *toc;
|
||||
} ParallelWorkerContext;
|
||||
|
||||
extern volatile bool ParallelMessagePending;
|
||||
extern PGDLLIMPORT volatile bool ParallelMessagePending;
|
||||
extern PGDLLIMPORT int ParallelWorkerNumber;
|
||||
extern PGDLLIMPORT bool InitializingParallelWorker;
|
||||
|
||||
|
@ -39,6 +39,6 @@ extern void AttachSession(dsm_handle handle);
|
||||
extern void DetachSession(void);
|
||||
|
||||
/* The current session, or NULL for none. */
|
||||
extern Session *CurrentSession;
|
||||
extern PGDLLIMPORT Session *CurrentSession;
|
||||
|
||||
#endif /* SESSION_H */
|
||||
|
@ -28,8 +28,8 @@
|
||||
#define DEFAULT_TABLE_ACCESS_METHOD "heap"
|
||||
|
||||
/* GUCs */
|
||||
extern char *default_table_access_method;
|
||||
extern bool synchronize_seqscans;
|
||||
extern PGDLLIMPORT char *default_table_access_method;
|
||||
extern PGDLLIMPORT bool synchronize_seqscans;
|
||||
|
||||
|
||||
struct BulkInsertStateData;
|
||||
|
@ -20,7 +20,7 @@
|
||||
* but the value is one of the char values defined below, as they appear in
|
||||
* pg_attribute.attcompression, e.g. TOAST_PGLZ_COMPRESSION.
|
||||
*/
|
||||
extern int default_toast_compression;
|
||||
extern PGDLLIMPORT int default_toast_compression;
|
||||
|
||||
/*
|
||||
* Built-in compression method ID. The toast compression header will store
|
||||
|
@ -28,10 +28,10 @@ typedef uint8 TwoPhaseRmgrId;
|
||||
#define TWOPHASE_RM_PREDICATELOCK_ID 4
|
||||
#define TWOPHASE_RM_MAX_ID TWOPHASE_RM_PREDICATELOCK_ID
|
||||
|
||||
extern const TwoPhaseCallback twophase_recover_callbacks[];
|
||||
extern const TwoPhaseCallback twophase_postcommit_callbacks[];
|
||||
extern const TwoPhaseCallback twophase_postabort_callbacks[];
|
||||
extern const TwoPhaseCallback twophase_standby_recover_callbacks[];
|
||||
extern PGDLLIMPORT const TwoPhaseCallback twophase_recover_callbacks[];
|
||||
extern PGDLLIMPORT const TwoPhaseCallback twophase_postcommit_callbacks[];
|
||||
extern PGDLLIMPORT const TwoPhaseCallback twophase_postabort_callbacks[];
|
||||
extern PGDLLIMPORT const TwoPhaseCallback twophase_standby_recover_callbacks[];
|
||||
|
||||
|
||||
extern void RegisterTwoPhaseRecord(TwoPhaseRmgrId rmid, uint16 info,
|
||||
|
@ -38,7 +38,7 @@
|
||||
#define XACT_REPEATABLE_READ 2
|
||||
#define XACT_SERIALIZABLE 3
|
||||
|
||||
extern int DefaultXactIsoLevel;
|
||||
extern PGDLLIMPORT int DefaultXactIsoLevel;
|
||||
extern PGDLLIMPORT int XactIsoLevel;
|
||||
|
||||
/*
|
||||
@ -52,18 +52,18 @@ extern PGDLLIMPORT int XactIsoLevel;
|
||||
#define IsolationIsSerializable() (XactIsoLevel == XACT_SERIALIZABLE)
|
||||
|
||||
/* Xact read-only state */
|
||||
extern bool DefaultXactReadOnly;
|
||||
extern bool XactReadOnly;
|
||||
extern PGDLLIMPORT bool DefaultXactReadOnly;
|
||||
extern PGDLLIMPORT bool XactReadOnly;
|
||||
|
||||
/* flag for logging statements in this transaction */
|
||||
extern bool xact_is_sampled;
|
||||
extern PGDLLIMPORT bool xact_is_sampled;
|
||||
|
||||
/*
|
||||
* Xact is deferrable -- only meaningful (currently) for read only
|
||||
* SERIALIZABLE transactions
|
||||
*/
|
||||
extern bool DefaultXactDeferrable;
|
||||
extern bool XactDeferrable;
|
||||
extern PGDLLIMPORT bool DefaultXactDeferrable;
|
||||
extern PGDLLIMPORT bool XactDeferrable;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
@ -80,7 +80,7 @@ typedef enum
|
||||
#define SYNCHRONOUS_COMMIT_ON SYNCHRONOUS_COMMIT_REMOTE_FLUSH
|
||||
|
||||
/* Synchronous commit level */
|
||||
extern int synchronous_commit;
|
||||
extern PGDLLIMPORT int synchronous_commit;
|
||||
|
||||
/* used during logical streaming of a transaction */
|
||||
extern PGDLLIMPORT TransactionId CheckXidAlive;
|
||||
@ -93,7 +93,7 @@ extern PGDLLIMPORT bool bsysscan;
|
||||
* globally accessible, so can be set from anywhere in the code which requires
|
||||
* recording flags.
|
||||
*/
|
||||
extern int MyXactFlags;
|
||||
extern PGDLLIMPORT int MyXactFlags;
|
||||
|
||||
/*
|
||||
* XACT_FLAGS_ACCESSEDTEMPNAMESPACE - set when a temporary object is accessed.
|
||||
|
@ -24,35 +24,35 @@
|
||||
#define SYNC_METHOD_OPEN 2 /* for O_SYNC */
|
||||
#define SYNC_METHOD_FSYNC_WRITETHROUGH 3
|
||||
#define SYNC_METHOD_OPEN_DSYNC 4 /* for O_DSYNC */
|
||||
extern int sync_method;
|
||||
extern PGDLLIMPORT int sync_method;
|
||||
|
||||
extern XLogRecPtr ProcLastRecPtr;
|
||||
extern XLogRecPtr XactLastRecEnd;
|
||||
extern PGDLLIMPORT XLogRecPtr ProcLastRecPtr;
|
||||
extern PGDLLIMPORT XLogRecPtr XactLastRecEnd;
|
||||
extern PGDLLIMPORT XLogRecPtr XactLastCommitEnd;
|
||||
|
||||
/* these variables are GUC parameters related to XLOG */
|
||||
extern PGDLLIMPORT int wal_segment_size;
|
||||
extern int min_wal_size_mb;
|
||||
extern int max_wal_size_mb;
|
||||
extern int wal_keep_size_mb;
|
||||
extern int max_slot_wal_keep_size_mb;
|
||||
extern int XLOGbuffers;
|
||||
extern int XLogArchiveTimeout;
|
||||
extern int wal_retrieve_retry_interval;
|
||||
extern char *XLogArchiveCommand;
|
||||
extern bool EnableHotStandby;
|
||||
extern bool fullPageWrites;
|
||||
extern bool wal_log_hints;
|
||||
extern int wal_compression;
|
||||
extern bool wal_init_zero;
|
||||
extern bool wal_recycle;
|
||||
extern bool *wal_consistency_checking;
|
||||
extern char *wal_consistency_checking_string;
|
||||
extern bool log_checkpoints;
|
||||
extern bool track_wal_io_timing;
|
||||
extern int wal_decode_buffer_size;
|
||||
extern PGDLLIMPORT int wal_segment_size;
|
||||
extern PGDLLIMPORT int min_wal_size_mb;
|
||||
extern PGDLLIMPORT int max_wal_size_mb;
|
||||
extern PGDLLIMPORT int wal_keep_size_mb;
|
||||
extern PGDLLIMPORT int max_slot_wal_keep_size_mb;
|
||||
extern PGDLLIMPORT int XLOGbuffers;
|
||||
extern PGDLLIMPORT int XLogArchiveTimeout;
|
||||
extern PGDLLIMPORT int wal_retrieve_retry_interval;
|
||||
extern PGDLLIMPORT char *XLogArchiveCommand;
|
||||
extern PGDLLIMPORT bool EnableHotStandby;
|
||||
extern PGDLLIMPORT bool fullPageWrites;
|
||||
extern PGDLLIMPORT bool wal_log_hints;
|
||||
extern PGDLLIMPORT int wal_compression;
|
||||
extern PGDLLIMPORT bool wal_init_zero;
|
||||
extern PGDLLIMPORT bool wal_recycle;
|
||||
extern PGDLLIMPORT bool *wal_consistency_checking;
|
||||
extern PGDLLIMPORT char *wal_consistency_checking_string;
|
||||
extern PGDLLIMPORT bool log_checkpoints;
|
||||
extern PGDLLIMPORT bool track_wal_io_timing;
|
||||
extern PGDLLIMPORT int wal_decode_buffer_size;
|
||||
|
||||
extern int CheckPointSegments;
|
||||
extern PGDLLIMPORT int CheckPointSegments;
|
||||
|
||||
/* Archive modes */
|
||||
typedef enum ArchiveMode
|
||||
@ -61,7 +61,7 @@ typedef enum ArchiveMode
|
||||
ARCHIVE_MODE_ON, /* enabled while server is running normally */
|
||||
ARCHIVE_MODE_ALWAYS /* enabled always (even during recovery) */
|
||||
} ArchiveMode;
|
||||
extern int XLogArchiveMode;
|
||||
extern PGDLLIMPORT int XLogArchiveMode;
|
||||
|
||||
/* WAL levels */
|
||||
typedef enum WalLevel
|
||||
@ -121,7 +121,7 @@ extern PGDLLIMPORT int wal_level;
|
||||
#define XLogLogicalInfoActive() (wal_level >= WAL_LEVEL_LOGICAL)
|
||||
|
||||
#ifdef WAL_DEBUG
|
||||
extern bool XLOG_DEBUG;
|
||||
extern PGDLLIMPORT bool XLOG_DEBUG;
|
||||
#endif
|
||||
|
||||
/*
|
||||
@ -175,7 +175,7 @@ typedef struct CheckpointStatsData
|
||||
* entire sync phase. */
|
||||
} CheckpointStatsData;
|
||||
|
||||
extern CheckpointStatsData CheckpointStats;
|
||||
extern PGDLLIMPORT CheckpointStatsData CheckpointStats;
|
||||
|
||||
/*
|
||||
* GetWALAvailability return codes
|
||||
|
@ -358,9 +358,9 @@ extern void XLogRecGetBlockRefInfo(XLogReaderState *record, bool pretty,
|
||||
* Exported for the functions in timeline.c and xlogarchive.c. Only valid
|
||||
* in the startup process.
|
||||
*/
|
||||
extern bool ArchiveRecoveryRequested;
|
||||
extern bool InArchiveRecovery;
|
||||
extern bool StandbyMode;
|
||||
extern char *recoveryRestoreCommand;
|
||||
extern PGDLLIMPORT bool ArchiveRecoveryRequested;
|
||||
extern PGDLLIMPORT bool InArchiveRecovery;
|
||||
extern PGDLLIMPORT bool StandbyMode;
|
||||
extern PGDLLIMPORT char *recoveryRestoreCommand;
|
||||
|
||||
#endif /* XLOG_INTERNAL_H */
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include "access/xlogrecord.h"
|
||||
|
||||
/* GUCs */
|
||||
extern int recovery_prefetch;
|
||||
extern PGDLLIMPORT int recovery_prefetch;
|
||||
|
||||
/* Possible values for recovery_prefetch */
|
||||
typedef enum
|
||||
|
@ -49,33 +49,33 @@ typedef enum RecoveryPauseState
|
||||
} RecoveryPauseState;
|
||||
|
||||
/* User-settable GUC parameters */
|
||||
extern bool recoveryTargetInclusive;
|
||||
extern int recoveryTargetAction;
|
||||
extern int recovery_min_apply_delay;
|
||||
extern char *PrimaryConnInfo;
|
||||
extern char *PrimarySlotName;
|
||||
extern char *recoveryRestoreCommand;
|
||||
extern char *recoveryEndCommand;
|
||||
extern char *archiveCleanupCommand;
|
||||
extern PGDLLIMPORT bool recoveryTargetInclusive;
|
||||
extern PGDLLIMPORT int recoveryTargetAction;
|
||||
extern PGDLLIMPORT int recovery_min_apply_delay;
|
||||
extern PGDLLIMPORT char *PrimaryConnInfo;
|
||||
extern PGDLLIMPORT char *PrimarySlotName;
|
||||
extern PGDLLIMPORT char *recoveryRestoreCommand;
|
||||
extern PGDLLIMPORT char *recoveryEndCommand;
|
||||
extern PGDLLIMPORT char *archiveCleanupCommand;
|
||||
|
||||
/* indirectly set via GUC system */
|
||||
extern TransactionId recoveryTargetXid;
|
||||
extern char *recovery_target_time_string;
|
||||
extern TimestampTz recoveryTargetTime;
|
||||
extern const char *recoveryTargetName;
|
||||
extern XLogRecPtr recoveryTargetLSN;
|
||||
extern RecoveryTargetType recoveryTarget;
|
||||
extern char *PromoteTriggerFile;
|
||||
extern bool wal_receiver_create_temp_slot;
|
||||
extern RecoveryTargetTimeLineGoal recoveryTargetTimeLineGoal;
|
||||
extern TimeLineID recoveryTargetTLIRequested;
|
||||
extern TimeLineID recoveryTargetTLI;
|
||||
extern PGDLLIMPORT TransactionId recoveryTargetXid;
|
||||
extern PGDLLIMPORT char *recovery_target_time_string;
|
||||
extern PGDLLIMPORT TimestampTz recoveryTargetTime;
|
||||
extern PGDLLIMPORT const char *recoveryTargetName;
|
||||
extern PGDLLIMPORT XLogRecPtr recoveryTargetLSN;
|
||||
extern PGDLLIMPORT RecoveryTargetType recoveryTarget;
|
||||
extern PGDLLIMPORT char *PromoteTriggerFile;
|
||||
extern PGDLLIMPORT bool wal_receiver_create_temp_slot;
|
||||
extern PGDLLIMPORT RecoveryTargetTimeLineGoal recoveryTargetTimeLineGoal;
|
||||
extern PGDLLIMPORT TimeLineID recoveryTargetTLIRequested;
|
||||
extern PGDLLIMPORT TimeLineID recoveryTargetTLI;
|
||||
|
||||
/* Have we already reached a consistent database state? */
|
||||
extern bool reachedConsistency;
|
||||
extern PGDLLIMPORT bool reachedConsistency;
|
||||
|
||||
/* Are we currently in standby mode? */
|
||||
extern bool StandbyMode;
|
||||
extern PGDLLIMPORT bool StandbyMode;
|
||||
|
||||
extern Size XLogRecoveryShmemSize(void);
|
||||
extern void XLogRecoveryShmemInit(void);
|
||||
|
@ -21,7 +21,7 @@
|
||||
* potentially perform work during recovery should check RecoveryInProgress().
|
||||
* See XLogCtl notes in xlog.c.
|
||||
*/
|
||||
extern bool InRecovery;
|
||||
extern PGDLLIMPORT bool InRecovery;
|
||||
|
||||
/*
|
||||
* Like InRecovery, standbyState is only valid in the startup process.
|
||||
@ -52,7 +52,7 @@ typedef enum
|
||||
STANDBY_SNAPSHOT_READY
|
||||
} HotStandbyState;
|
||||
|
||||
extern HotStandbyState standbyState;
|
||||
extern PGDLLIMPORT HotStandbyState standbyState;
|
||||
|
||||
#define InHotStandby (standbyState >= STANDBY_SNAPSHOT_PENDING)
|
||||
|
||||
|
Reference in New Issue
Block a user