35#define UINT32_ACCESS_ONCE(var) ((uint32)(*((volatile uint32 *)&(var))))
37#define HAS_PGSTAT_PERMISSIONS(role) (has_privs_of_role(GetUserId(), ROLE_PG_READ_ALL_STATS) || has_privs_of_role(GetUserId(), role))
39#define PG_STAT_GET_RELENTRY_INT64(stat) \
41CppConcat(pg_stat_get_,stat)(PG_FUNCTION_ARGS) \
43 Oid relid = PG_GETARG_OID(0); \
45 PgStat_StatTabEntry *tabentry; \
47 if ((tabentry = pgstat_fetch_stat_tabentry(relid)) == NULL) \
50 result = (int64) (tabentry->stat); \
52 PG_RETURN_INT64(result); \
109#define PG_STAT_GET_RELENTRY_FLOAT8(stat) \
111CppConcat(pg_stat_get_,stat)(PG_FUNCTION_ARGS) \
113 Oid relid = PG_GETARG_OID(0); \
115 PgStat_StatTabEntry *tabentry; \
117 if ((tabentry = pgstat_fetch_stat_tabentry(relid)) == NULL) \
120 result = (double) (tabentry->stat); \
122 PG_RETURN_FLOAT8(result); \
137#define PG_STAT_GET_RELENTRY_TIMESTAMPTZ(stat) \
139CppConcat(pg_stat_get_,stat)(PG_FUNCTION_ARGS) \
141 Oid relid = PG_GETARG_OID(0); \
142 TimestampTz result; \
143 PgStat_StatTabEntry *tabentry; \
145 if ((tabentry = pgstat_fetch_stat_tabentry(relid)) == NULL) \
148 result = tabentry->stat; \
153 PG_RETURN_TIMESTAMPTZ(result); \
183#define PG_STAT_GET_FUNCENTRY_FLOAT8_MS(stat) \
185CppConcat(pg_stat_get_function_,stat)(PG_FUNCTION_ARGS) \
187 Oid funcid = PG_GETARG_OID(0); \
189 PgStat_StatFuncEntry *funcentry; \
191 if ((funcentry = pgstat_fetch_stat_funcentry(funcid)) == NULL) \
193 result = ((double) funcentry->stat) / 1000.0; \
194 PG_RETURN_FLOAT8(result); \
257#define PG_STAT_GET_PROGRESS_COLS PGSTAT_NUM_PROGRESS_PARAM + 3
279 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
280 errmsg(
"invalid command name: \"%s\"", cmd)));
285 for (curr_backend = 1; curr_backend <= num_backends; curr_backend++)
333#define PG_STAT_GET_ACTIVITY_COLS 31
342 for (curr_backend = 1; curr_backend <= num_backends; curr_backend++)
350 const char *wait_event_type = NULL;
351 const char *wait_event = NULL;
392 char *clipped_activity;
424 pfree(clipped_activity);
528 char remote_host[NI_MAXHOST];
529 char remote_port[NI_MAXSERV];
532 remote_host[0] =
'\0';
533 remote_port[0] =
'\0';
536 remote_host,
sizeof(remote_host),
537 remote_port,
sizeof(remote_port),
538 NI_NUMERICHOST | NI_NUMERICSERV);
581 const char *bgw_type;
622 nulls[19] = nulls[20] = nulls[21] = nulls[22] = nulls[23] = nulls[24] =
true;
737#define PG_STAT_GET_SUBXACT_COLS 2
774 const char *activity;
775 char *clipped_activity;
779 activity =
"<backend information not available>";
781 activity =
"<insufficient privilege>";
783 activity =
"<command string not enabled>";
789 pfree(clipped_activity);
800 const char *wait_event_type = NULL;
803 wait_event_type =
"<backend information not available>";
805 wait_event_type =
"<insufficient privilege>";
809 if (!wait_event_type)
821 const char *wait_event = NULL;
824 wait_event =
"<backend information not available>";
826 wait_event =
"<insufficient privilege>";
912 char remote_host[NI_MAXHOST];
935 remote_host[0] =
'\0';
938 remote_host,
sizeof(remote_host),
940 NI_NUMERICHOST | NI_NUMERICSERV);
955 char remote_port[NI_MAXSERV];
980 remote_port[0] =
'\0';
984 remote_port,
sizeof(remote_port),
985 NI_NUMERICHOST | NI_NUMERICSERV);
1003 for (
idx = 1;
idx <= tot_backends;
idx++)
1015#define PG_STAT_GET_DBENTRY_INT64(stat) \
1017CppConcat(pg_stat_get_db_,stat)(PG_FUNCTION_ARGS) \
1019 Oid dbid = PG_GETARG_OID(0); \
1021 PgStat_StatDBEntry *dbentry; \
1023 if ((dbentry = pgstat_fetch_stat_dbentry(dbid)) == NULL) \
1026 result = (int64) (dbentry->stat); \
1028 PG_RETURN_INT64(result); \
1182#define PG_STAT_GET_DBENTRY_FLOAT8_MS(stat) \
1184CppConcat(pg_stat_get_db_,stat)(PG_FUNCTION_ARGS) \
1186 Oid dbid = PG_GETARG_OID(0); \
1188 PgStat_StatDBEntry *dbentry; \
1190 if ((dbentry = pgstat_fetch_stat_dbentry(dbid)) == NULL) \
1193 result = ((double) dbentry->stat) / 1000.0; \
1195 PG_RETURN_FLOAT8(result); \
1365 elog(
ERROR,
"unrecognized IOOp value: %d", io_op);
1392 elog(
ERROR,
"unrecognized IOOp value: %d", io_op);
1421 elog(
ERROR,
"unrecognized IOOp value: %d", io_op);
1428 return val_ms * (double) 0.001;
1468 if (stat_reset_timestamp != 0)
1487 bktype_stats->
counts[io_obj][io_context][io_op];
1492 nulls[op_idx] =
true;
1500 bktype_stats->
times[io_obj][io_context][io_op];
1510 bktype_stats->
bytes[io_obj][io_context][io_op];
1523 nulls[time_idx] =
true;
1525 nulls[byte_idx] =
true;
1594 bktype_stats = &backend_stats->
io_stats;
1619#define PG_STAT_WAL_COLS 5
1636 TIMESTAMPTZOID, -1, 0);
1653 if (stat_reset_timestamp != 0)
1705#define PG_STAT_GET_SLRU_COLS 9
1746#define PG_STAT_GET_XACT_RELENTRY_INT64(stat) \
1748CppConcat(pg_stat_get_xact_,stat)(PG_FUNCTION_ARGS) \
1750 Oid relid = PG_GETARG_OID(0); \
1752 PgStat_TableStatus *tabentry; \
1754 if ((tabentry = find_tabstat_entry(relid)) == NULL) \
1757 result = (int64) (tabentry->counts.stat); \
1759 PG_RETURN_INT64(result); \
1803#define PG_STAT_GET_XACT_FUNCENTRY_FLOAT8_MS(stat) \
1805CppConcat(pg_stat_get_xact_function_,stat)(PG_FUNCTION_ARGS) \
1807 Oid funcid = PG_GETARG_OID(0); \
1808 PgStat_FunctionCounts *funcentry; \
1810 if ((funcentry = find_funcstat_entry(funcid)) == NULL) \
1812 PG_RETURN_FLOAT8(INSTR_TIME_GET_MILLISEC(funcentry->stat)); \
1874 char *target = NULL;
1892 if (strcmp(target,
"archiver") == 0)
1894 else if (strcmp(target,
"bgwriter") == 0)
1896 else if (strcmp(target,
"checkpointer") == 0)
1898 else if (strcmp(target,
"io") == 0)
1900 else if (strcmp(target,
"recovery_prefetch") == 0)
1902 else if (strcmp(target,
"slru") == 0)
1904 else if (strcmp(target,
"wal") == 0)
1908 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
1909 errmsg(
"unrecognized reset target: \"%s\"", target),
1910 errhint(
"Target must be \"archiver\", \"bgwriter\", \"checkpointer\", \"io\", \"recovery_prefetch\", \"slru\", or \"wal\".")));
1979 char *target = NULL;
1996 char *target = NULL;
2026 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
2027 errmsg(
"invalid subscription OID %u", subid)));
2039 bool nulls[7] = {0};
2049 TIMESTAMPTZOID, -1, 0);
2055 TIMESTAMPTZOID, -1, 0);
2057 TIMESTAMPTZOID, -1, 0);
2103#define PG_STAT_GET_REPLICATION_SLOT_COLS 10
2133 TIMESTAMPTZOID, -1, 0);
2174#define PG_STAT_GET_SUBSCRIPTION_STATS_COLS 11
2209 TIMESTAMPTZOID, -1, 0);
2216 subentry = &allzero;
Datum idx(PG_FUNCTION_ARGS)
Datum numeric_in(PG_FUNCTION_ARGS)
#define PGSTAT_NUM_PROGRESS_PARAM
@ PROGRESS_COMMAND_ANALYZE
@ PROGRESS_COMMAND_CLUSTER
@ PROGRESS_COMMAND_CREATE_INDEX
@ PROGRESS_COMMAND_VACUUM
@ PROGRESS_COMMAND_BASEBACKUP
int pgstat_fetch_stat_numbackends(void)
LocalPgBackendStatus * pgstat_get_local_beentry_by_proc_number(ProcNumber procNumber)
char * pgstat_clip_activity(const char *raw_activity)
LocalPgBackendStatus * pgstat_get_local_beentry_by_index(int idx)
PgBackendStatus * pgstat_get_beentry_by_proc_number(ProcNumber procNumber)
@ STATE_IDLEINTRANSACTION_ABORTED
@ STATE_IDLEINTRANSACTION
const char * GetBackgroundWorkerTypeByPid(pid_t pid)
static Datum values[MAXATTR]
#define CStringGetTextDatum(s)
#define OidIsValid(objectId)
bool IsSharedRelation(Oid relationId)
#define CONFLICT_NUM_TYPES
int errhint(const char *fmt,...)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
TupleDesc BlessTupleDesc(TupleDesc tupdesc)
Datum Int64GetDatum(int64 X)
Datum Float8GetDatum(float8 X)
#define PG_GETARG_TEXT_PP(n)
#define PG_RETURN_FLOAT8(x)
#define PG_RETURN_INT64(x)
#define DirectFunctionCall1(func, arg1)
#define PG_GETARG_INT64(n)
#define PG_RETURN_TEXT_P(x)
#define PG_RETURN_INT32(x)
#define PG_GETARG_INT32(n)
#define PG_RETURN_DATUM(x)
#define DirectFunctionCall3(func, arg1, arg2, arg3)
#define PG_RETURN_BOOL(x)
#define PG_GETARG_TEXT_P(n)
void InitMaterializedSRF(FunctionCallInfo fcinfo, bits32 flags)
#define SRF_IS_FIRSTCALL()
#define SRF_PERCALL_SETUP()
#define SRF_RETURN_NEXT(_funcctx, _result)
#define SRF_FIRSTCALL_INIT()
static Datum HeapTupleGetDatum(const HeapTupleData *tuple)
#define SRF_RETURN_DONE(_funcctx)
Assert(PointerIsAligned(start, uint64))
HeapTuple heap_form_tuple(TupleDesc tupleDescriptor, const Datum *values, const bool *isnull)
Datum int4in(PG_FUNCTION_ARGS)
int pg_getnameinfo_all(const struct sockaddr_storage *addr, int salen, char *node, int nodelen, char *service, int servicelen, int flags)
if(TABLE==NULL||TABLE_index==NULL)
pid_t GetLeaderApplyWorkerPid(pid_t pid)
void * MemoryContextAlloc(MemoryContext context, Size size)
void pfree(void *pointer)
static bool pg_memory_is_all_zeros(const void *ptr, size_t len)
#define BACKEND_NUM_TYPES
const char * GetBackendTypeDesc(BackendType backendType)
void namestrcpy(Name name, const char *str)
void clean_ipv6_addr(int addr_family, char *addr)
Datum inet_in(PG_FUNCTION_ARGS)
void pgstat_reset(PgStat_Kind kind, Oid dboid, uint64 objid)
void pgstat_reset_counters(void)
void pgstat_reset_of_kind(PgStat_Kind kind)
void pgstat_force_next_flush(void)
void pgstat_clear_snapshot(void)
TimestampTz pgstat_get_stat_snapshot_timestamp(bool *have_snapshot)
bool pgstat_have_entry(PgStat_Kind kind, Oid dboid, uint64 objid)
PgStat_Kind pgstat_get_kind_from_str(char *kind_str)
#define IOCONTEXT_NUM_TYPES
#define IOOBJECT_NUM_TYPES
PgStat_ArchiverStats * pgstat_fetch_stat_archiver(void)
bool pgstat_tracks_backend_bktype(BackendType bktype)
PgStat_Backend * pgstat_fetch_stat_backend_by_pid(int pid, BackendType *bktype)
PgStat_BgWriterStats * pgstat_fetch_stat_bgwriter(void)
PgStat_CheckpointerStats * pgstat_fetch_stat_checkpointer(void)
PgStat_StatDBEntry * pgstat_fetch_stat_dbentry(Oid dboid)
PgStat_StatFuncEntry * pgstat_fetch_stat_funcentry(Oid func_id)
PgStat_FunctionCounts * find_funcstat_entry(Oid func_id)
PgStat_IO * pgstat_fetch_stat_io(void)
const char * pgstat_get_io_context_name(IOContext io_context)
bool pgstat_tracks_io_bktype(BackendType bktype)
const char * pgstat_get_io_object_name(IOObject io_object)
bool pgstat_bktype_io_stats_valid(PgStat_BktypeIO *backend_io, BackendType bktype)
bool pgstat_tracks_io_op(BackendType bktype, IOObject io_object, IOContext io_context, IOOp io_op)
bool pgstat_tracks_io_object(BackendType bktype, IOObject io_object, IOContext io_context)
#define PGSTAT_KIND_ARCHIVER
#define PGSTAT_KIND_BGWRITER
#define PGSTAT_KIND_REPLSLOT
#define PGSTAT_KIND_FUNCTION
#define PGSTAT_KIND_RELATION
#define PGSTAT_KIND_CHECKPOINTER
#define PGSTAT_KIND_SUBSCRIPTION
#define PGSTAT_KIND_BACKEND
void pgstat_reset_replslot(const char *name)
PgStat_StatReplSlotEntry * pgstat_fetch_replslot(NameData slotname)
PgStat_SLRUStats * pgstat_fetch_slru(void)
const char * pgstat_get_slru_name(int slru_idx)
void pgstat_reset_slru(const char *name)
PgStat_StatSubEntry * pgstat_fetch_stat_subscription(Oid subid)
PgStat_WalStats * pgstat_fetch_stat_wal(void)
#define PG_STAT_GET_XACT_RELENTRY_INT64(stat)
Datum pg_stat_get_progress_info(PG_FUNCTION_ARGS)
Datum pg_stat_get_checkpointer_num_requested(PG_FUNCTION_ARGS)
Datum pg_stat_get_snapshot_timestamp(PG_FUNCTION_ARGS)
Datum pg_stat_get_backend_client_addr(PG_FUNCTION_ARGS)
Datum pg_stat_get_db_stat_reset_time(PG_FUNCTION_ARGS)
Datum pg_stat_get_wal(PG_FUNCTION_ARGS)
Datum pg_stat_reset_replication_slot(PG_FUNCTION_ARGS)
Datum pg_stat_get_checkpointer_num_timed(PG_FUNCTION_ARGS)
#define UINT32_ACCESS_ONCE(var)
Datum pg_stat_get_activity(PG_FUNCTION_ARGS)
Datum pg_stat_get_slru(PG_FUNCTION_ARGS)
static void pg_stat_io_build_tuples(ReturnSetInfo *rsinfo, PgStat_BktypeIO *bktype_stats, BackendType bktype, TimestampTz stat_reset_timestamp)
Datum pg_stat_get_backend_client_port(PG_FUNCTION_ARGS)
Datum pg_stat_get_backend_start(PG_FUNCTION_ARGS)
Datum pg_stat_get_db_conflict_all(PG_FUNCTION_ARGS)
Datum pg_stat_get_subscription_stats(PG_FUNCTION_ARGS)
#define PG_STAT_GET_SLRU_COLS
#define PG_STAT_GET_DBENTRY_INT64(stat)
Datum pg_stat_get_checkpointer_buffers_written(PG_FUNCTION_ARGS)
Datum pg_stat_get_backend_pid(PG_FUNCTION_ARGS)
Datum pg_stat_get_checkpointer_sync_time(PG_FUNCTION_ARGS)
static double pg_stat_us_to_ms(PgStat_Counter val_ms)
#define PG_STAT_GET_ACTIVITY_COLS
static Datum pg_stat_wal_build_tuple(PgStat_WalCounters wal_counters, TimestampTz stat_reset_timestamp)
static io_stat_col pgstat_get_io_time_index(IOOp io_op)
Datum pg_stat_get_backend_activity(PG_FUNCTION_ARGS)
#define PG_STAT_GET_FUNCENTRY_FLOAT8_MS(stat)
Datum pg_stat_get_db_numbackends(PG_FUNCTION_ARGS)
Datum pg_stat_get_db_checksum_failures(PG_FUNCTION_ARGS)
Datum pg_stat_reset_subscription_stats(PG_FUNCTION_ARGS)
Datum pg_stat_clear_snapshot(PG_FUNCTION_ARGS)
Datum pg_stat_reset_slru(PG_FUNCTION_ARGS)
Datum pg_stat_get_checkpointer_restartpoints_requested(PG_FUNCTION_ARGS)
Datum pg_stat_get_checkpointer_num_performed(PG_FUNCTION_ARGS)
Datum pg_stat_get_db_checksum_last_failure(PG_FUNCTION_ARGS)
Datum pg_stat_get_backend_wal(PG_FUNCTION_ARGS)
static io_stat_col pgstat_get_io_op_index(IOOp io_op)
Datum pg_stat_have_stats(PG_FUNCTION_ARGS)
Datum pg_stat_get_backend_idset(PG_FUNCTION_ARGS)
Datum pg_stat_get_backend_wait_event_type(PG_FUNCTION_ARGS)
static io_stat_col pgstat_get_io_byte_index(IOOp io_op)
#define PG_STAT_GET_SUBSCRIPTION_STATS_COLS
Datum pg_stat_get_bgwriter_maxwritten_clean(PG_FUNCTION_ARGS)
Datum pg_stat_get_bgwriter_buf_written_clean(PG_FUNCTION_ARGS)
Datum pg_stat_get_io(PG_FUNCTION_ARGS)
Datum pg_stat_get_checkpointer_restartpoints_performed(PG_FUNCTION_ARGS)
#define PG_STAT_GET_DBENTRY_FLOAT8_MS(stat)
Datum pg_stat_get_backend_userid(PG_FUNCTION_ARGS)
Datum pg_stat_reset(PG_FUNCTION_ARGS)
Datum pg_stat_get_backend_wait_event(PG_FUNCTION_ARGS)
#define PG_STAT_GET_SUBXACT_COLS
#define PG_STAT_GET_XACT_FUNCENTRY_FLOAT8_MS(stat)
#define PG_STAT_GET_RELENTRY_INT64(stat)
Datum pg_stat_get_backend_dbid(PG_FUNCTION_ARGS)
Datum pg_stat_get_xact_function_calls(PG_FUNCTION_ARGS)
#define PG_STAT_GET_RELENTRY_TIMESTAMPTZ(stat)
Datum pg_stat_reset_backend_stats(PG_FUNCTION_ARGS)
#define PG_STAT_GET_PROGRESS_COLS
Datum pg_stat_get_checkpointer_write_time(PG_FUNCTION_ARGS)
#define HAS_PGSTAT_PERMISSIONS(role)
Datum pg_stat_get_backend_io(PG_FUNCTION_ARGS)
Datum pg_stat_get_checkpointer_slru_written(PG_FUNCTION_ARGS)
#define PG_STAT_GET_RELENTRY_FLOAT8(stat)
Datum pg_stat_get_archiver(PG_FUNCTION_ARGS)
Datum pg_stat_get_checkpointer_restartpoints_timed(PG_FUNCTION_ARGS)
Datum pg_stat_reset_shared(PG_FUNCTION_ARGS)
Datum pg_stat_force_next_flush(PG_FUNCTION_ARGS)
Datum pg_stat_reset_single_table_counters(PG_FUNCTION_ARGS)
Datum pg_stat_get_bgwriter_stat_reset_time(PG_FUNCTION_ARGS)
Datum pg_stat_get_backend_xact_start(PG_FUNCTION_ARGS)
Datum pg_stat_get_checkpointer_stat_reset_time(PG_FUNCTION_ARGS)
Datum pg_stat_get_function_calls(PG_FUNCTION_ARGS)
Datum pg_stat_get_backend_subxact(PG_FUNCTION_ARGS)
Datum pg_stat_get_replication_slot(PG_FUNCTION_ARGS)
Datum pg_stat_get_backend_activity_start(PG_FUNCTION_ARGS)
Datum pg_stat_reset_single_function_counters(PG_FUNCTION_ARGS)
Datum pg_stat_get_buf_alloc(PG_FUNCTION_ARGS)
Datum pg_backend_pid(PG_FUNCTION_ARGS)
#define PG_STAT_GET_REPLICATION_SLOT_COLS
int pg_strcasecmp(const char *s1, const char *s2)
static Datum PointerGetDatum(const void *X)
static Datum TransactionIdGetDatum(TransactionId X)
static Datum UInt64GetDatum(uint64 X)
static Datum BoolGetDatum(bool X)
static Datum ObjectIdGetDatum(Oid X)
static Datum CStringGetDatum(const char *X)
static Datum Int32GetDatum(int32 X)
#define GetNumberFromPGProc(proc)
PGPROC * BackendPidGetProc(int pid)
PGPROC * AuxiliaryPidGetProc(int pid)
MemoryContext multi_call_memory_ctx
TransactionId backend_xid
PgBackendStatus backendStatus
int backend_subxact_count
TransactionId backend_xmin
bool backend_subxact_overflowed
char gss_princ[NAMEDATALEN]
char ssl_version[NAMEDATALEN]
char ssl_cipher[NAMEDATALEN]
char ssl_client_dn[NAMEDATALEN]
char ssl_client_serial[NAMEDATALEN]
char ssl_issuer_dn[NAMEDATALEN]
BackendType st_backendType
TimestampTz st_state_start_timestamp
TimestampTz st_proc_start_timestamp
PgBackendGSSStatus * st_gssstatus
TimestampTz st_activity_start_timestamp
ProgressCommandType st_progress_command
int64 st_progress_param[PGSTAT_NUM_PROGRESS_PARAM]
PgBackendSSLStatus * st_sslstatus
TimestampTz st_xact_start_timestamp
Oid st_progress_command_target
TimestampTz last_failed_timestamp
TimestampTz stat_reset_timestamp
TimestampTz last_archived_timestamp
char last_failed_wal[MAX_XFN_CHARS+1]
PgStat_Counter failed_count
PgStat_Counter archived_count
char last_archived_wal[MAX_XFN_CHARS+1]
TimestampTz stat_reset_timestamp
PgStat_WalCounters wal_counters
PgStat_Counter times[IOOBJECT_NUM_TYPES][IOCONTEXT_NUM_TYPES][IOOP_NUM_TYPES]
uint64 bytes[IOOBJECT_NUM_TYPES][IOCONTEXT_NUM_TYPES][IOOP_NUM_TYPES]
PgStat_Counter counts[IOOBJECT_NUM_TYPES][IOCONTEXT_NUM_TYPES][IOOP_NUM_TYPES]
PgStat_BktypeIO stats[BACKEND_NUM_TYPES]
TimestampTz stat_reset_timestamp
PgStat_Counter conflict_startup_deadlock
PgStat_Counter conflict_lock
TimestampTz stat_reset_timestamp
PgStat_Counter conflict_snapshot
TimestampTz last_checksum_failure
PgStat_Counter conflict_bufferpin
PgStat_Counter conflict_logicalslot
PgStat_Counter checksum_failures
PgStat_Counter conflict_tablespace
TimestampTz stat_reset_timestamp
PgStat_Counter stream_count
PgStat_Counter total_txns
PgStat_Counter total_bytes
PgStat_Counter spill_txns
PgStat_Counter stream_txns
PgStat_Counter spill_count
PgStat_Counter stream_bytes
PgStat_Counter spill_bytes
PgStat_Counter apply_error_count
PgStat_Counter sync_error_count
PgStat_Counter conflict_count[CONFLICT_NUM_TYPES]
TimestampTz stat_reset_timestamp
PgStat_Counter wal_buffers_full
PgStat_Counter wal_records
TimestampTz stat_reset_timestamp
PgStat_WalCounters wal_counters
Tuplestorestate * setResult
struct sockaddr_storage addr
#define TransactionIdIsValid(xid)
TupleDesc CreateTemplateTupleDesc(int natts)
void TupleDescInitEntry(TupleDesc desc, AttrNumber attributeNumber, const char *attributeName, Oid oidtypeid, int32 typmod, int attdim)
void tuplestore_putvalues(Tuplestorestate *state, TupleDesc tdesc, const Datum *values, const bool *isnull)
static Datum TimestampTzGetDatum(TimestampTz X)
#define PG_RETURN_TIMESTAMPTZ(x)
text * cstring_to_text(const char *s)
char * text_to_cstring(const text *t)
const char * pgstat_get_wait_event_type(uint32 wait_event_info)
const char * pgstat_get_wait_event(uint32 wait_event_info)
bool DataChecksumsEnabled(void)
void XLogPrefetchResetStats(void)