diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/miscadmin.h | 22 | ||||
-rw-r--r-- | src/include/pgstat.h | 21 |
2 files changed, 23 insertions, 20 deletions
diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h index 6b9093733fb..14fa127ab11 100644 --- a/src/include/miscadmin.h +++ b/src/include/miscadmin.h @@ -306,6 +306,28 @@ extern void InitStandaloneProcess(const char *argv0); extern void SwitchToSharedLatch(void); extern void SwitchBackToLocalLatch(void); +typedef enum BackendType +{ + B_INVALID = 0, + B_AUTOVAC_LAUNCHER, + B_AUTOVAC_WORKER, + B_BACKEND, + B_BG_WORKER, + B_BG_WRITER, + B_CHECKPOINTER, + B_STARTUP, + B_WAL_RECEIVER, + B_WAL_SENDER, + B_WAL_WRITER, + B_ARCHIVER, + B_STATS_COLLECTOR, + B_LOGGER, +} BackendType; + +extern BackendType MyBackendType; + +extern const char *GetBackendTypeDesc(BackendType backendType); + extern void SetDatabasePath(const char *path); extern void checkDataDir(void); extern void SetDataDir(const char *dir); diff --git a/src/include/pgstat.h b/src/include/pgstat.h index 7bc36c65838..1a19921f803 100644 --- a/src/include/pgstat.h +++ b/src/include/pgstat.h @@ -13,6 +13,7 @@ #include "datatype/timestamp.h" #include "libpq/pqcomm.h" +#include "miscadmin.h" #include "port/atomics.h" #include "portability/instr_time.h" #include "postmaster/pgarch.h" @@ -713,25 +714,6 @@ typedef struct PgStat_GlobalStats /* ---------- - * Backend types - * ---------- - */ -typedef enum BackendType -{ - B_AUTOVAC_LAUNCHER, - B_AUTOVAC_WORKER, - B_BACKEND, - B_BG_WORKER, - B_BG_WRITER, - B_CHECKPOINTER, - B_STARTUP, - B_WAL_RECEIVER, - B_WAL_SENDER, - B_WAL_WRITER -} BackendType; - - -/* ---------- * Backend states * ---------- */ @@ -1286,7 +1268,6 @@ extern const char *pgstat_get_wait_event_type(uint32 wait_event_info); extern const char *pgstat_get_backend_current_activity(int pid, bool checkUser); extern const char *pgstat_get_crashed_backend_activity(int pid, char *buffer, int buflen); -extern const char *pgstat_get_backend_desc(BackendType backendType); extern void pgstat_progress_start_command(ProgressCommandType cmdtype, Oid relid); |