PostgreSQL Source Code
git master
|
#include "datatype/timestamp.h"
#include "libpq/pqcomm.h"
#include "miscadmin.h"
#include "port/atomics.h"
#include "portability/instr_time.h"
#include "postmaster/pgarch.h"
#include "storage/proc.h"
#include "utils/hsearch.h"
#include "utils/relcache.h"
Go to the source code of this file.
#define PG_WAIT_ACTIVITY 0x05000000U |
Definition at line 898 of file pgstat.h.
Referenced by pgstat_get_wait_event(), and pgstat_get_wait_event_type().
#define PG_WAIT_BUFFER_PIN 0x04000000U |
Definition at line 897 of file pgstat.h.
Referenced by LockBufferForCleanup(), pgstat_get_wait_event(), pgstat_get_wait_event_type(), and ResolveRecoveryConflictWithBufferPin().
#define PG_WAIT_CLIENT 0x06000000U |
Definition at line 899 of file pgstat.h.
Referenced by pgstat_get_wait_event(), and pgstat_get_wait_event_type().
#define PG_WAIT_EXTENSION 0x07000000U |
Definition at line 900 of file pgstat.h.
Referenced by autoprewarm_main(), initialize_worker_spi(), pgfdw_get_cleanup_result(), pgfdw_get_result(), pgstat_get_wait_event(), pgstat_get_wait_event_type(), test_shm_mq_pipelined(), and wait_for_workers_to_become_ready().
#define PG_WAIT_IO 0x0A000000U |
Definition at line 903 of file pgstat.h.
Referenced by pgstat_get_wait_event(), and pgstat_get_wait_event_type().
#define PG_WAIT_IPC 0x08000000U |
Definition at line 901 of file pgstat.h.
Referenced by pgstat_get_wait_event(), and pgstat_get_wait_event_type().
#define PG_WAIT_LOCK 0x03000000U |
Definition at line 896 of file pgstat.h.
Referenced by pgstat_get_wait_event(), pgstat_get_wait_event_type(), ProcSleep(), and ResolveRecoveryConflictWithLock().
#define PG_WAIT_LWLOCK 0x01000000U |
Definition at line 895 of file pgstat.h.
Referenced by GetLWLockIdentifier(), LWLockReportWaitStart(), pgstat_get_wait_event(), and pgstat_get_wait_event_type().
#define PG_WAIT_TIMEOUT 0x09000000U |
Definition at line 902 of file pgstat.h.
Referenced by pgstat_get_wait_event(), and pgstat_get_wait_event_type().
#define pgstat_begin_read_activity | ( | beentry, | |
before_changecount | |||
) |
Definition at line 1301 of file pgstat.h.
Referenced by pgstat_get_backend_current_activity(), and pgstat_read_current_status().
#define PGSTAT_BEGIN_WRITE_ACTIVITY | ( | beentry | ) |
Definition at line 1286 of file pgstat.h.
Referenced by pgstat_beshutdown_hook(), pgstat_bestart(), pgstat_progress_end_command(), pgstat_progress_start_command(), pgstat_progress_update_multi_param(), pgstat_progress_update_param(), pgstat_report_activity(), pgstat_report_appname(), and pgstat_report_xact_timestamp().
#define pgstat_count_buffer_hit | ( | rel | ) |
Definition at line 1558 of file pgstat.h.
Referenced by ReadBufferExtended().
#define pgstat_count_buffer_read | ( | rel | ) |
Definition at line 1553 of file pgstat.h.
Referenced by ReadBufferExtended().
#define pgstat_count_buffer_read_time | ( | n | ) | (pgStatBlockReadTime += (n)) |
Definition at line 1563 of file pgstat.h.
Referenced by ReadBuffer_common().
#define pgstat_count_buffer_write_time | ( | n | ) | (pgStatBlockWriteTime += (n)) |
Definition at line 1565 of file pgstat.h.
Referenced by FlushBuffer().
#define pgstat_count_heap_fetch | ( | rel | ) |
Definition at line 1538 of file pgstat.h.
Referenced by heapam_scan_bitmap_next_tuple(), and index_fetch_heap().
#define pgstat_count_heap_getnext | ( | rel | ) |
Definition at line 1533 of file pgstat.h.
Referenced by heap_getnext(), heap_getnextslot(), heap_getnextslot_tidrange(), and heapam_scan_sample_next_tuple().
#define pgstat_count_heap_scan | ( | rel | ) |
Definition at line 1528 of file pgstat.h.
Referenced by initscan().
#define pgstat_count_index_scan | ( | rel | ) |
Definition at line 1543 of file pgstat.h.
Referenced by _bt_first(), _hash_first(), bringetbitmap(), gistgetbitmap(), and gistgettuple().
#define pgstat_count_index_tuples | ( | rel, | |
n | |||
) |
Definition at line 1548 of file pgstat.h.
Referenced by index_getbitmap(), and index_getnext_tid().
#define pgstat_end_read_activity | ( | beentry, | |
after_changecount | |||
) |
Definition at line 1307 of file pgstat.h.
Referenced by pgstat_get_backend_current_activity(), and pgstat_read_current_status().
#define PGSTAT_END_WRITE_ACTIVITY | ( | beentry | ) |
Definition at line 1293 of file pgstat.h.
Referenced by pgstat_beshutdown_hook(), pgstat_bestart(), pgstat_progress_end_command(), pgstat_progress_start_command(), pgstat_progress_update_multi_param(), pgstat_progress_update_param(), pgstat_report_activity(), pgstat_report_appname(), and pgstat_report_xact_timestamp().
#define PGSTAT_FILE_FORMAT_ID 0x01A5BCA0 |
Definition at line 695 of file pgstat.h.
Referenced by pgstat_read_db_statsfile(), pgstat_read_db_statsfile_timestamp(), pgstat_read_statsfiles(), pgstat_write_db_statsfile(), and pgstat_write_statsfiles().
#define PGSTAT_MAX_MSG_SIZE 1000 |
Definition at line 224 of file pgstat.h.
Referenced by pgstat_init().
#define PGSTAT_MSG_PAYLOAD (PGSTAT_MAX_MSG_SIZE - sizeof(PgStat_MsgHdr)) |
#define PGSTAT_NUM_FUNCENTRIES |
Definition at line 583 of file pgstat.h.
Referenced by pgstat_send_funcstats().
#define PGSTAT_NUM_FUNCPURGE |
#define PGSTAT_NUM_PROGRESS_PARAM 20 |
Definition at line 1118 of file pgstat.h.
Referenced by pg_stat_get_progress_info(), pgstat_progress_update_multi_param(), and pgstat_progress_update_param().
#define PGSTAT_NUM_TABENTRIES |
Definition at line 281 of file pgstat.h.
Referenced by pgstat_report_stat().
#define PGSTAT_NUM_TABPURGE |
#define pgstat_read_activity_complete | ( | before_changecount, | |
after_changecount | |||
) |
Definition at line 1313 of file pgstat.h.
Referenced by pgstat_get_backend_current_activity(), and pgstat_read_current_status().
#define PGSTAT_STAT_PERMANENT_DIRECTORY "pg_stat" |
Definition at line 29 of file pgstat.h.
Referenced by get_dbstat_filename(), and pgstat_reset_all().
#define PGSTAT_STAT_PERMANENT_FILENAME "pg_stat/global.stat" |
Definition at line 30 of file pgstat.h.
Referenced by pgstat_read_db_statsfile_timestamp(), pgstat_read_statsfiles(), and pgstat_write_statsfiles().
#define PGSTAT_STAT_PERMANENT_TMPFILE "pg_stat/global.tmp" |
Definition at line 31 of file pgstat.h.
Referenced by pgstat_write_statsfiles().
typedef enum BackendState BackendState |
typedef struct LocalPgBackendStatus LocalPgBackendStatus |
typedef struct PgBackendGSSStatus PgBackendGSSStatus |
typedef struct PgBackendSSLStatus PgBackendSSLStatus |
typedef struct PgBackendStatus PgBackendStatus |
typedef struct PgStat_ArchiverStats PgStat_ArchiverStats |
typedef struct PgStat_BackendFunctionEntry PgStat_BackendFunctionEntry |
typedef int64 PgStat_Counter |
typedef struct PgStat_FunctionCallUsage PgStat_FunctionCallUsage |
typedef struct PgStat_FunctionCounts PgStat_FunctionCounts |
typedef struct PgStat_FunctionEntry PgStat_FunctionEntry |
typedef struct PgStat_GlobalStats PgStat_GlobalStats |
typedef union PgStat_Msg PgStat_Msg |
typedef struct PgStat_MsgAnalyze PgStat_MsgAnalyze |
typedef struct PgStat_MsgArchiver PgStat_MsgArchiver |
typedef struct PgStat_MsgAutovacStart PgStat_MsgAutovacStart |
typedef struct PgStat_MsgBgWriter PgStat_MsgBgWriter |
typedef struct PgStat_MsgChecksumFailure PgStat_MsgChecksumFailure |
typedef struct PgStat_MsgConn PgStat_MsgConn |
typedef struct PgStat_MsgDeadlock PgStat_MsgDeadlock |
typedef struct PgStat_MsgDropdb PgStat_MsgDropdb |
typedef struct PgStat_MsgDummy PgStat_MsgDummy |
typedef struct PgStat_MsgFuncpurge PgStat_MsgFuncpurge |
typedef struct PgStat_MsgFuncstat PgStat_MsgFuncstat |
typedef struct PgStat_MsgHdr PgStat_MsgHdr |
typedef struct PgStat_MsgInquiry PgStat_MsgInquiry |
typedef struct PgStat_MsgRecoveryConflict PgStat_MsgRecoveryConflict |
typedef struct PgStat_MsgReplSlot PgStat_MsgReplSlot |
typedef struct PgStat_MsgResetcounter PgStat_MsgResetcounter |
typedef struct PgStat_MsgResetreplslotcounter PgStat_MsgResetreplslotcounter |
typedef struct PgStat_MsgResetsharedcounter PgStat_MsgResetsharedcounter |
typedef struct PgStat_MsgResetsinglecounter PgStat_MsgResetsinglecounter |
typedef struct PgStat_MsgResetslrucounter PgStat_MsgResetslrucounter |
typedef struct PgStat_MsgSLRU PgStat_MsgSLRU |
typedef struct PgStat_MsgTabpurge PgStat_MsgTabpurge |
typedef struct PgStat_MsgTabstat PgStat_MsgTabstat |
typedef struct PgStat_MsgTempFile PgStat_MsgTempFile |
typedef struct PgStat_MsgVacuum PgStat_MsgVacuum |
typedef struct PgStat_MsgWal PgStat_MsgWal |
typedef struct PgStat_ReplSlotStats PgStat_ReplSlotStats |
typedef enum PgStat_Shared_Reset_Target PgStat_Shared_Reset_Target |
typedef enum PgStat_Single_Reset_Type PgStat_Single_Reset_Type |
typedef struct PgStat_SLRUStats PgStat_SLRUStats |
typedef struct PgStat_StatDBEntry PgStat_StatDBEntry |
typedef struct PgStat_StatFuncEntry PgStat_StatFuncEntry |
typedef struct PgStat_StatTabEntry PgStat_StatTabEntry |
typedef struct PgStat_TableCounts PgStat_TableCounts |
typedef struct PgStat_TableEntry PgStat_TableEntry |
typedef struct PgStat_TableStatus PgStat_TableStatus |
typedef struct PgStat_TableXactStatus PgStat_TableXactStatus |
typedef struct PgStat_WalStats PgStat_WalStats |
typedef enum ProgressCommandType ProgressCommandType |
typedef enum SessionEndType SessionEndType |
typedef enum StatMsgType StatMsgType |
typedef enum TrackFunctionsLevel TrackFunctionsLevel |
enum BackendState |
Enumerator | |
---|---|
STATE_UNDEFINED | |
STATE_IDLE | |
STATE_RUNNING | |
STATE_IDLEINTRANSACTION | |
STATE_FASTPATH | |
STATE_IDLEINTRANSACTION_ABORTED | |
STATE_DISABLED |
Definition at line 879 of file pgstat.h.
Enumerator | |
---|---|
RESET_ARCHIVER | |
RESET_BGWRITER | |
RESET_WAL |
Enumerator | |
---|---|
RESET_TABLE | |
RESET_FUNCTION |
Definition at line 144 of file pgstat.h.
enum ProgressCommandType |
Enumerator | |
---|---|
PROGRESS_COMMAND_INVALID | |
PROGRESS_COMMAND_VACUUM | |
PROGRESS_COMMAND_ANALYZE | |
PROGRESS_COMMAND_CLUSTER | |
PROGRESS_COMMAND_CREATE_INDEX | |
PROGRESS_COMMAND_BASEBACKUP | |
PROGRESS_COMMAND_COPY |
Definition at line 1107 of file pgstat.h.
enum SessionEndType |
Enumerator | |
---|---|
DISCONNECT_NOT_YET | |
DISCONNECT_NORMAL | |
DISCONNECT_CLIENT_EOF | |
DISCONNECT_FATAL | |
DISCONNECT_KILLED |
Definition at line 45 of file pgstat.h.
enum StatMsgType |
Definition at line 58 of file pgstat.h.
enum TrackFunctionsLevel |
Enumerator | |
---|---|
TRACK_FUNC_OFF | |
TRACK_FUNC_PL | |
TRACK_FUNC_ALL |
enum WaitEventActivity |
Definition at line 913 of file pgstat.h.
enum WaitEventClient |
Definition at line 938 of file pgstat.h.
enum WaitEventIO |
Definition at line 1025 of file pgstat.h.
enum WaitEventIPC |
Definition at line 958 of file pgstat.h.
enum WaitEventTimeout |
Enumerator | |
---|---|
WAIT_EVENT_BASE_BACKUP_THROTTLE | |
WAIT_EVENT_PG_SLEEP | |
WAIT_EVENT_RECOVERY_APPLY_DELAY | |
WAIT_EVENT_RECOVERY_RETRIEVE_RETRY_INTERVAL | |
WAIT_EVENT_VACUUM_DELAY |
Definition at line 1010 of file pgstat.h.
void allow_immediate_pgstat_restart | ( | void | ) |
Definition at line 844 of file pgstat.c.
References last_pgstat_start_time.
Referenced by HandleChildCrash().
void AtEOSubXact_PgStat | ( | bool | isCommit, |
int | nestDepth | ||
) |
Definition at line 2408 of file pgstat.c.
References Assert, PgStat_SubXactStatus::first, get_tabstat_stack_level(), PgStat_TableXactStatus::nest_level, PgStat_SubXactStatus::nest_level, PgStat_TableXactStatus::next, PgStat_TableXactStatus::parent, pfree(), pgstat_truncate_restore_counters(), pgstat_truncate_save_counters(), pgStatXactStack, PgStat_SubXactStatus::prev, PgStat_TableStatus::t_counts, PgStat_TableCounts::t_delta_dead_tuples, PgStat_TableCounts::t_tuples_deleted, PgStat_TableCounts::t_tuples_inserted, PgStat_TableCounts::t_tuples_updated, PgStat_TableStatus::trans, trans, PgStat_TableXactStatus::truncated, PgStat_TableXactStatus::tuples_deleted, PgStat_TableXactStatus::tuples_inserted, PgStat_TableXactStatus::tuples_updated, and PgStat_TableXactStatus::upper.
Referenced by AbortSubTransaction(), and CommitSubTransaction().
Definition at line 2321 of file pgstat.c.
References Assert, PgStat_SubXactStatus::first, PgStat_TableXactStatus::nest_level, PgStat_SubXactStatus::nest_level, PgStat_TableXactStatus::next, PgStat_TableXactStatus::parent, pgstat_clear_snapshot(), pgstat_truncate_restore_counters(), pgStatXactCommit, pgStatXactRollback, pgStatXactStack, PgStat_SubXactStatus::prev, PgStat_TableCounts::t_changed_tuples, PgStat_TableStatus::t_counts, PgStat_TableCounts::t_delta_dead_tuples, PgStat_TableCounts::t_delta_live_tuples, PgStat_TableCounts::t_truncated, PgStat_TableCounts::t_tuples_deleted, PgStat_TableCounts::t_tuples_inserted, PgStat_TableCounts::t_tuples_updated, PgStat_TableStatus::trans, trans, PgStat_TableXactStatus::truncated, PgStat_TableXactStatus::tuples_deleted, PgStat_TableXactStatus::tuples_inserted, PgStat_TableXactStatus::tuples_updated, and PgStat_TableXactStatus::upper.
Referenced by AbortTransaction(), CommitTransaction(), and FinishPreparedTransaction().
void AtPrepare_PgStat | ( | void | ) |
Definition at line 2507 of file pgstat.c.
References Assert, PgStat_TableXactStatus::deleted_pre_trunc, TwoPhasePgStatRecord::deleted_pre_trunc, PgStat_SubXactStatus::first, PgStat_TableXactStatus::inserted_pre_trunc, TwoPhasePgStatRecord::inserted_pre_trunc, PgStat_TableXactStatus::nest_level, PgStat_SubXactStatus::nest_level, PgStat_TableXactStatus::next, PgStat_TableXactStatus::parent, pgStatXactStack, PgStat_SubXactStatus::prev, RegisterTwoPhaseRecord(), PgStat_TableStatus::t_id, TwoPhasePgStatRecord::t_id, PgStat_TableStatus::t_shared, TwoPhasePgStatRecord::t_shared, TwoPhasePgStatRecord::t_truncated, PgStat_TableStatus::trans, trans, PgStat_TableXactStatus::truncated, PgStat_TableXactStatus::tuples_deleted, TwoPhasePgStatRecord::tuples_deleted, PgStat_TableXactStatus::tuples_inserted, TwoPhasePgStatRecord::tuples_inserted, PgStat_TableXactStatus::tuples_updated, TwoPhasePgStatRecord::tuples_updated, TWOPHASE_RM_PGSTAT_ID, PgStat_TableXactStatus::updated_pre_trunc, TwoPhasePgStatRecord::updated_pre_trunc, and PgStat_TableXactStatus::upper.
Referenced by PrepareTransaction().
Size BackendStatusShmemSize | ( | void | ) |
Definition at line 2928 of file pgstat.c.
References add_size(), mul_size(), NAMEDATALEN, NumBackendStatSlots, and pgstat_track_activity_query_size.
Referenced by CreateSharedMemoryAndSemaphores().
void CreateSharedBackendStatus | ( | void | ) |
Definition at line 2961 of file pgstat.c.
References BackendActivityBuffer, BackendActivityBufferSize, BackendAppnameBuffer, BackendClientHostnameBuffer, i, MemSet, mul_size(), NAMEDATALEN, NumBackendStatSlots, pgstat_track_activity_query_size, ShmemInitStruct(), PgBackendStatus::st_activity_raw, PgBackendStatus::st_appname, PgBackendStatus::st_clienthostname, PgBackendStatus::st_gssstatus, and PgBackendStatus::st_sslstatus.
Referenced by CreateSharedMemoryAndSemaphores().
PgStat_BackendFunctionEntry* find_funcstat_entry | ( | Oid | func_id | ) |
Definition at line 1906 of file pgstat.c.
References HASH_FIND, and hash_search().
Referenced by pg_stat_get_xact_function_calls(), pg_stat_get_xact_function_self_time(), and pg_stat_get_xact_function_total_time().
PgStat_TableStatus* find_tabstat_entry | ( | Oid | rel_id | ) |
Definition at line 2106 of file pgstat.c.
References HASH_FIND, hash_search(), and TabStatHashEntry::tsa_entry.
Referenced by pg_stat_get_xact_blocks_fetched(), pg_stat_get_xact_blocks_hit(), pg_stat_get_xact_numscans(), pg_stat_get_xact_tuples_deleted(), pg_stat_get_xact_tuples_fetched(), pg_stat_get_xact_tuples_hot_updated(), pg_stat_get_xact_tuples_inserted(), pg_stat_get_xact_tuples_returned(), and pg_stat_get_xact_tuples_updated().
void pgstat_bestart | ( | void | ) |
Definition at line 3145 of file pgstat.c.
References application_name, Assert, B_BACKEND, B_BG_WORKER, B_WAL_SENDER, be_gssapi_get_auth(), be_gssapi_get_enc(), be_gssapi_get_princ(), be_tls_get_cipher(), be_tls_get_cipher_bits(), be_tls_get_compression(), be_tls_get_peer_issuer_name(), be_tls_get_peer_serial(), be_tls_get_peer_subject_name(), be_tls_get_version(), GetSessionUserId(), Port::gss, PgBackendGSSStatus::gss_auth, PgBackendGSSStatus::gss_enc, PgBackendGSSStatus::gss_princ, InvalidOid, MemSet, MyBackendType, MyBEEntry, MyDatabaseId, MyProcPid, MyProcPort, MyStartTimestamp, NAMEDATALEN, PGSTAT_BEGIN_WRITE_ACTIVITY, PGSTAT_END_WRITE_ACTIVITY, pgstat_report_appname(), pgstat_track_activity_query_size, PROGRESS_COMMAND_INVALID, Port::raddr, Port::remote_hostname, PgBackendSSLStatus::ssl_bits, PgBackendSSLStatus::ssl_cipher, PgBackendSSLStatus::ssl_client_dn, PgBackendSSLStatus::ssl_client_serial, PgBackendSSLStatus::ssl_compression, Port::ssl_in_use, PgBackendSSLStatus::ssl_issuer_dn, PgBackendSSLStatus::ssl_version, PgBackendStatus::st_activity_raw, PgBackendStatus::st_activity_start_timestamp, PgBackendStatus::st_appname, PgBackendStatus::st_backendType, PgBackendStatus::st_changecount, PgBackendStatus::st_clientaddr, PgBackendStatus::st_clienthostname, PgBackendStatus::st_databaseid, PgBackendStatus::st_gss, PgBackendStatus::st_gssstatus, PgBackendStatus::st_proc_start_timestamp, PgBackendStatus::st_procpid, PgBackendStatus::st_progress_command, PgBackendStatus::st_progress_command_target, PgBackendStatus::st_ssl, PgBackendStatus::st_sslstatus, PgBackendStatus::st_state, PgBackendStatus::st_state_start_timestamp, PgBackendStatus::st_userid, PgBackendStatus::st_xact_start_timestamp, STATE_UNDEFINED, strlcpy(), and unvolatize.
Referenced by AuxiliaryProcessMain(), and InitPostgres().
void pgstat_clear_snapshot | ( | void | ) |
Definition at line 6270 of file pgstat.c.
References localNumBackends, and MemoryContextDelete().
Referenced by AtEOXact_PgStat(), autovac_refresh_stats(), AutoVacLauncherMain(), pg_stat_clear_snapshot(), and PostPrepare_PgStat().
char* pgstat_clip_activity | ( | const char * | raw_activity | ) |
Definition at line 7220 of file pgstat.c.
References cliplen(), pg_mbcliplen(), pgstat_track_activity_query_size, and pnstrdup().
Referenced by pg_stat_get_activity(), pg_stat_get_backend_activity(), and pgstat_get_backend_current_activity().
void pgstat_count_heap_delete | ( | Relation | rel | ) |
Definition at line 2221 of file pgstat.c.
References add_tabstat_xact_level(), GetCurrentTransactionNestLevel(), PgStat_TableXactStatus::nest_level, RelationData::pgstat_info, PgStat_TableStatus::trans, and PgStat_TableXactStatus::tuples_deleted.
Referenced by heap_abort_speculative(), and heap_delete().
void pgstat_count_heap_insert | ( | Relation | rel, |
PgStat_Counter | n | ||
) |
Definition at line 2175 of file pgstat.c.
References add_tabstat_xact_level(), GetCurrentTransactionNestLevel(), PgStat_TableXactStatus::nest_level, RelationData::pgstat_info, PgStat_TableStatus::trans, and PgStat_TableXactStatus::tuples_inserted.
Referenced by ExecRefreshMatView(), heap_insert(), and heap_multi_insert().
Definition at line 2196 of file pgstat.c.
References add_tabstat_xact_level(), GetCurrentTransactionNestLevel(), PgStat_TableXactStatus::nest_level, RelationData::pgstat_info, PgStat_TableStatus::t_counts, PgStat_TableCounts::t_tuples_hot_updated, PgStat_TableStatus::trans, and PgStat_TableXactStatus::tuples_updated.
Referenced by heap_update().
void pgstat_count_slru_flush | ( | int | slru_idx | ) |
Definition at line 7402 of file pgstat.c.
References PgStat_MsgSLRU::m_flush, and slru_entry().
Referenced by SimpleLruWriteAll().
void pgstat_count_slru_page_exists | ( | int | slru_idx | ) |
Definition at line 7384 of file pgstat.c.
References PgStat_MsgSLRU::m_blocks_exists, and slru_entry().
Referenced by SimpleLruDoesPhysicalPageExist().
void pgstat_count_slru_page_hit | ( | int | slru_idx | ) |
Definition at line 7378 of file pgstat.c.
References PgStat_MsgSLRU::m_blocks_hit, and slru_entry().
Referenced by SimpleLruReadPage(), and SimpleLruReadPage_ReadOnly().
void pgstat_count_slru_page_read | ( | int | slru_idx | ) |
Definition at line 7390 of file pgstat.c.
References PgStat_MsgSLRU::m_blocks_read, and slru_entry().
Referenced by SimpleLruReadPage().
void pgstat_count_slru_page_written | ( | int | slru_idx | ) |
Definition at line 7396 of file pgstat.c.
References PgStat_MsgSLRU::m_blocks_written, and slru_entry().
Referenced by SlruPhysicalWritePage().
void pgstat_count_slru_page_zeroed | ( | int | slru_idx | ) |
Definition at line 7372 of file pgstat.c.
References PgStat_MsgSLRU::m_blocks_zeroed, and slru_entry().
Referenced by SimpleLruZeroPage().
void pgstat_count_slru_truncate | ( | int | slru_idx | ) |
Definition at line 7408 of file pgstat.c.
References PgStat_MsgSLRU::m_truncate, and slru_entry().
Referenced by SimpleLruTruncate().
void pgstat_count_truncate | ( | Relation | rel | ) |
Definition at line 2276 of file pgstat.c.
References add_tabstat_xact_level(), GetCurrentTransactionNestLevel(), PgStat_TableXactStatus::nest_level, RelationData::pgstat_info, pgstat_truncate_save_counters(), PgStat_TableStatus::trans, PgStat_TableXactStatus::tuples_deleted, PgStat_TableXactStatus::tuples_inserted, and PgStat_TableXactStatus::tuples_updated.
Referenced by ExecRefreshMatView(), and ExecuteTruncateGuts().
void pgstat_drop_database | ( | Oid | databaseid | ) |
Definition at line 1322 of file pgstat.c.
References PgStat_MsgTabpurge::m_databaseid, PgStat_MsgDropdb::m_databaseid, PgStat_MsgTabpurge::m_hdr, PgStat_MsgDropdb::m_hdr, PgStat_MsgTabpurge::m_nentries, PgStat_MsgTabpurge::m_tableid, MyDatabaseId, offsetof, PGINVALID_SOCKET, PGSTAT_MTYPE_DROPDB, PGSTAT_MTYPE_TABPURGE, pgstat_send(), pgstat_setheader(), and pgStatSock.
Referenced by dropdb(), and pgstat_vacuum_stat().
void pgstat_end_function_usage | ( | PgStat_FunctionCallUsage * | fcu, |
bool | finalize | ||
) |
Definition at line 1926 of file pgstat.c.
References PgStat_FunctionCounts::f_numcalls, PgStat_FunctionCounts::f_self_time, PgStat_FunctionCallUsage::f_start, PgStat_FunctionCounts::f_total_time, PgStat_FunctionCallUsage::fs, have_function_stats, INSTR_TIME_ADD, INSTR_TIME_SET_CURRENT, INSTR_TIME_SUBTRACT, PgStat_FunctionCallUsage::save_f_total_time, PgStat_FunctionCallUsage::save_total, and total_func_time.
Referenced by call_pltcl_start_proc(), EventTriggerInvoke(), ExecCallTriggerFunc(), ExecEvalFuncExprFusage(), ExecEvalFuncExprStrictFusage(), ExecMakeFunctionResultSet(), ExecMakeTableFunctionResult(), ExecuteCallStmt(), and fmgr_security_definer().
PgStat_GlobalStats* pgstat_fetch_global | ( | void | ) |
Definition at line 2848 of file pgstat.c.
References backend_read_statsfile(), and globalStats.
Referenced by pg_stat_get_bgwriter_buf_written_checkpoints(), pg_stat_get_bgwriter_buf_written_clean(), pg_stat_get_bgwriter_maxwritten_clean(), pg_stat_get_bgwriter_requested_checkpoints(), pg_stat_get_bgwriter_stat_reset_time(), pg_stat_get_bgwriter_timed_checkpoints(), pg_stat_get_buf_alloc(), pg_stat_get_buf_fsync_backend(), pg_stat_get_buf_written_backend(), pg_stat_get_checkpoint_sync_time(), pg_stat_get_checkpoint_write_time(), and pg_stat_get_snapshot_timestamp().
PgStat_ReplSlotStats* pgstat_fetch_replslot | ( | int * | nslots_p | ) |
Definition at line 2897 of file pgstat.c.
References backend_read_statsfile(), nReplSlotStats, and replSlotStats.
Referenced by pg_stat_get_replication_slots().
PgStat_SLRUStats* pgstat_fetch_slru | ( | void | ) |
Definition at line 2880 of file pgstat.c.
References backend_read_statsfile(), and slruStats.
Referenced by pg_stat_get_slru().
PgStat_ArchiverStats* pgstat_fetch_stat_archiver | ( | void | ) |
Definition at line 2831 of file pgstat.c.
References archiverStats, and backend_read_statsfile().
Referenced by pg_stat_get_archiver().
PgBackendStatus* pgstat_fetch_stat_beentry | ( | int | beid | ) |
Definition at line 2774 of file pgstat.c.
References LocalPgBackendStatus::backendStatus, localNumBackends, and pgstat_read_current_status().
Referenced by pg_stat_get_backend_activity(), pg_stat_get_backend_activity_start(), pg_stat_get_backend_client_addr(), pg_stat_get_backend_client_port(), pg_stat_get_backend_dbid(), pg_stat_get_backend_pid(), pg_stat_get_backend_start(), pg_stat_get_backend_userid(), pg_stat_get_backend_wait_event(), pg_stat_get_backend_wait_event_type(), pg_stat_get_backend_xact_start(), and pg_stat_get_db_numbackends().
PgStat_StatDBEntry* pgstat_fetch_stat_dbentry | ( | Oid | dbid | ) |
Definition at line 2659 of file pgstat.c.
References backend_read_statsfile(), HASH_FIND, and hash_search().
Referenced by do_autovacuum(), do_start_worker(), pg_stat_get_db_active_time(), pg_stat_get_db_blk_read_time(), pg_stat_get_db_blk_write_time(), pg_stat_get_db_blocks_fetched(), pg_stat_get_db_blocks_hit(), pg_stat_get_db_checksum_failures(), pg_stat_get_db_checksum_last_failure(), pg_stat_get_db_conflict_all(), pg_stat_get_db_conflict_bufferpin(), pg_stat_get_db_conflict_lock(), pg_stat_get_db_conflict_snapshot(), pg_stat_get_db_conflict_startup_deadlock(), pg_stat_get_db_conflict_tablespace(), pg_stat_get_db_deadlocks(), pg_stat_get_db_idle_in_transaction_time(), pg_stat_get_db_session_time(), pg_stat_get_db_sessions(), pg_stat_get_db_sessions_abandoned(), pg_stat_get_db_sessions_fatal(), pg_stat_get_db_sessions_killed(), pg_stat_get_db_stat_reset_time(), pg_stat_get_db_temp_bytes(), pg_stat_get_db_temp_files(), pg_stat_get_db_tuples_deleted(), pg_stat_get_db_tuples_fetched(), pg_stat_get_db_tuples_inserted(), pg_stat_get_db_tuples_returned(), pg_stat_get_db_tuples_updated(), pg_stat_get_db_xact_commit(), pg_stat_get_db_xact_rollback(), pgstat_fetch_stat_funcentry(), rebuild_database_list(), and recheck_relation_needs_vacanalyze().
PgStat_StatFuncEntry* pgstat_fetch_stat_funcentry | ( | Oid | funcid | ) |
Definition at line 2742 of file pgstat.c.
References backend_read_statsfile(), PgStat_StatDBEntry::functions, HASH_FIND, hash_search(), MyDatabaseId, and pgstat_fetch_stat_dbentry().
Referenced by pg_stat_get_function_calls(), pg_stat_get_function_self_time(), and pg_stat_get_function_total_time().
LocalPgBackendStatus* pgstat_fetch_stat_local_beentry | ( | int | beid | ) |
Definition at line 2796 of file pgstat.c.
References localNumBackends, and pgstat_read_current_status().
Referenced by pg_stat_get_activity(), and pg_stat_get_progress_info().
int pgstat_fetch_stat_numbackends | ( | void | ) |
Definition at line 2815 of file pgstat.c.
References localNumBackends, and pgstat_read_current_status().
Referenced by pg_stat_get_activity(), pg_stat_get_backend_idset(), pg_stat_get_db_numbackends(), and pg_stat_get_progress_info().
PgStat_StatTabEntry* pgstat_fetch_stat_tabentry | ( | Oid | relid | ) |
Definition at line 2686 of file pgstat.c.
References backend_read_statsfile(), HASH_FIND, hash_search(), InvalidOid, MyDatabaseId, and PgStat_StatDBEntry::tables.
Referenced by index_concurrently_swap(), pg_stat_get_analyze_count(), pg_stat_get_autoanalyze_count(), pg_stat_get_autovacuum_count(), pg_stat_get_blocks_fetched(), pg_stat_get_blocks_hit(), pg_stat_get_dead_tuples(), pg_stat_get_ins_since_vacuum(), pg_stat_get_last_analyze_time(), pg_stat_get_last_autoanalyze_time(), pg_stat_get_last_autovacuum_time(), pg_stat_get_last_vacuum_time(), pg_stat_get_live_tuples(), pg_stat_get_mod_since_analyze(), pg_stat_get_numscans(), pg_stat_get_tuples_deleted(), pg_stat_get_tuples_fetched(), pg_stat_get_tuples_hot_updated(), pg_stat_get_tuples_inserted(), pg_stat_get_tuples_returned(), pg_stat_get_tuples_updated(), and pg_stat_get_vacuum_count().
PgStat_WalStats* pgstat_fetch_stat_wal | ( | void | ) |
Definition at line 2864 of file pgstat.c.
References backend_read_statsfile(), and walStats.
Referenced by pg_stat_get_wal().
const char* pgstat_get_backend_current_activity | ( | int | pid, |
bool | checkUser | ||
) |
Definition at line 4431 of file pgstat.c.
References BackendStatusArray, CHECK_FOR_INTERRUPTS, GetUserId(), i, MaxBackends, pgstat_begin_read_activity, pgstat_clip_activity(), pgstat_end_read_activity, pgstat_read_activity_complete, PgBackendStatus::st_activity_raw, PgBackendStatus::st_procpid, PgBackendStatus::st_userid, and superuser().
Referenced by DeadLockReport().
const char* pgstat_get_crashed_backend_activity | ( | int | pid, |
char * | buffer, | ||
int | buflen | ||
) |
Definition at line 4509 of file pgstat.c.
References ascii_safe_strlcpy(), BackendActivityBuffer, BackendActivityBufferSize, BackendStatusArray, i, MaxBackends, Min, pgstat_track_activity_query_size, PgBackendStatus::st_activity_raw, and PgBackendStatus::st_procpid.
Referenced by LogChildExit().
const char* pgstat_get_wait_event | ( | uint32 | wait_event_info | ) |
Definition at line 3815 of file pgstat.c.
References GetLockNameFromTagType(), GetLWLockIdentifier(), PG_WAIT_ACTIVITY, PG_WAIT_BUFFER_PIN, PG_WAIT_CLIENT, PG_WAIT_EXTENSION, PG_WAIT_IO, PG_WAIT_IPC, PG_WAIT_LOCK, PG_WAIT_LWLOCK, PG_WAIT_TIMEOUT, pgstat_get_wait_activity(), pgstat_get_wait_client(), pgstat_get_wait_io(), pgstat_get_wait_ipc(), and pgstat_get_wait_timeout().
Referenced by pg_stat_get_activity(), and pg_stat_get_backend_wait_event().
const char* pgstat_get_wait_event_type | ( | uint32 | wait_event_info | ) |
Definition at line 3760 of file pgstat.c.
References PG_WAIT_ACTIVITY, PG_WAIT_BUFFER_PIN, PG_WAIT_CLIENT, PG_WAIT_EXTENSION, PG_WAIT_IO, PG_WAIT_IPC, PG_WAIT_LOCK, PG_WAIT_LWLOCK, and PG_WAIT_TIMEOUT.
Referenced by pg_stat_get_activity(), and pg_stat_get_backend_wait_event_type().
void pgstat_init | ( | void | ) |
Definition at line 404 of file pgstat.c.
References addrinfo::ai_next, AI_PASSIVE, bind, closesocket, connect, EINTR, ereport, errcode(), errcode_for_socket_access(), errmsg(), gai_strerror, LOG, pg_freeaddrinfo_all(), pg_getaddrinfo_all(), pg_set_noblock(), PGC_INTERNAL, PGC_S_OVERRIDE, PGINVALID_SOCKET, PGSTAT_MAX_MSG_SIZE, PGSTAT_MIN_RCVBUF, pgStatAddr, pgStatSock, recv, ReserveExternalFD(), select, send, SetConfigOption(), socket, StaticAssertStmt, and TESTBYTEVAL.
Referenced by PostmasterMain().
void pgstat_init_function_usage | ( | struct FunctionCallInfoBaseData * | fcinfo, |
PgStat_FunctionCallUsage * | fcu | ||
) |
void pgstat_initialize | ( | void | ) |
Definition at line 3096 of file pgstat.c.
References Assert, InvalidBackendId, MaxBackends, MyAuxProcType, MyBackendId, NotAnAuxProcess, on_shmem_exit(), pgstat_beshutdown_hook(), and pgWalUsage.
Referenced by AuxiliaryProcessMain(), and InitPostgres().
void pgstat_initstats | ( | Relation | rel | ) |
Definition at line 1983 of file pgstat.c.
References get_tabstat_entry(), PGINVALID_SOCKET, RelationData::pgstat_info, pgstat_track_counts, pgStatSock, RelationData::rd_id, RelationData::rd_rel, and PgStat_TableStatus::t_id.
Referenced by relation_open(), and try_relation_open().
void pgstat_ping | ( | void | ) |
Definition at line 1820 of file pgstat.c.
References PgStat_MsgDummy::m_hdr, PGINVALID_SOCKET, PGSTAT_MTYPE_DUMMY, pgstat_send(), pgstat_setheader(), and pgStatSock.
void pgstat_progress_end_command | ( | void | ) |
Definition at line 3529 of file pgstat.c.
References InvalidOid, MyBEEntry, PGSTAT_BEGIN_WRITE_ACTIVITY, PGSTAT_END_WRITE_ACTIVITY, pgstat_track_activities, PROGRESS_COMMAND_INVALID, PgBackendStatus::st_progress_command, and PgBackendStatus::st_progress_command_target.
Referenced by AbortSubTransaction(), AbortTransaction(), analyze_rel(), cluster_rel(), DefineIndex(), EndCopy(), EndCopyFrom(), heap_vacuum_rel(), perform_base_backup(), reindex_index(), and ReindexRelationConcurrently().
void pgstat_progress_start_command | ( | ProgressCommandType | cmdtype, |
Oid | relid | ||
) |
Definition at line 3457 of file pgstat.c.
References MemSet, MyBEEntry, PGSTAT_BEGIN_WRITE_ACTIVITY, PGSTAT_END_WRITE_ACTIVITY, pgstat_track_activities, PgBackendStatus::st_progress_command, PgBackendStatus::st_progress_command_target, and PgBackendStatus::st_progress_param.
Referenced by analyze_rel(), BeginCopyFrom(), BeginCopyTo(), cluster_rel(), DefineIndex(), heap_vacuum_rel(), perform_base_backup(), reindex_index(), and ReindexRelationConcurrently().
void pgstat_progress_update_multi_param | ( | int | nparam, |
const int * | index, | ||
const int64 * | val | ||
) |
Definition at line 3500 of file pgstat.c.
References Assert, i, MyBEEntry, PGSTAT_BEGIN_WRITE_ACTIVITY, PGSTAT_END_WRITE_ACTIVITY, PGSTAT_NUM_PROGRESS_PARAM, pgstat_track_activities, and PgBackendStatus::st_progress_param.
Referenced by _bt_spools_heapscan(), BuildRelationExtStatistics(), DefineIndex(), heapam_relation_copy_for_cluster(), index_build(), lazy_scan_heap(), perform_base_backup(), reindex_index(), ReindexRelationConcurrently(), update_basebackup_progress(), validate_index(), and WaitForLockersMultiple().
void pgstat_progress_update_param | ( | int | index, |
int64 | val | ||
) |
Definition at line 3478 of file pgstat.c.
References Assert, MyBEEntry, PGSTAT_BEGIN_WRITE_ACTIVITY, PGSTAT_END_WRITE_ACTIVITY, PGSTAT_NUM_PROGRESS_PARAM, pgstat_track_activities, PgBackendStatus::st_progress_param, and val.
Referenced by _bt_leafbuild(), _bt_load(), _bt_spools_heapscan(), _h_indexbuild(), acquire_inherited_sample_rows(), acquire_sample_rows(), BeginCopyFrom(), btvacuumscan(), BuildRelationExtStatistics(), cluster_rel(), copy_dest_receive(), CopyFrom(), CopyLoadRawBuf(), CopySendEndOfRow(), DefineIndex(), do_analyze_rel(), DoCopyTo(), finish_heap_swap(), hashbuild(), heap_vacuum_rel(), heapam_index_build_range_scan(), heapam_index_validate_scan(), heapam_relation_copy_for_cluster(), lazy_cleanup_all_indexes(), lazy_record_dead_tuple(), lazy_scan_heap(), lazy_truncate_heap(), lazy_vacuum_all_indexes(), lazy_vacuum_heap(), lazy_vacuum_page(), perform_base_backup(), reindex_index(), reindex_relation(), ReindexRelationConcurrently(), validate_index(), WaitForLockersMultiple(), and WaitForOlderSnapshots().
void pgstat_report_activity | ( | BackendState | state, |
const char * | cmd_str | ||
) |
Definition at line 3355 of file pgstat.c.
References GetCurrentStatementStartTimestamp(), GetCurrentTimestamp(), Min, MyBEEntry, MyProc, PGSTAT_BEGIN_WRITE_ACTIVITY, PGSTAT_END_WRITE_ACTIVITY, pgstat_track_activities, pgstat_track_activity_query_size, pgStatActiveTime, pgStatTransactionIdleTime, PgBackendStatus::st_activity_raw, PgBackendStatus::st_activity_start_timestamp, PgBackendStatus::st_state, PgBackendStatus::st_state_start_timestamp, PgBackendStatus::st_xact_start_timestamp, STATE_DISABLED, STATE_FASTPATH, STATE_IDLEINTRANSACTION, STATE_IDLEINTRANSACTION_ABORTED, STATE_RUNNING, TimestampDifference(), and PGPROC::wait_event_info.
Referenced by _bt_parallel_build_main(), apply_handle_begin(), apply_handle_commit(), apply_handle_stream_commit(), apply_handle_stream_start(), apply_handle_stream_stop(), autovac_report_activity(), autovac_report_workitem(), exec_bind_message(), exec_execute_message(), exec_parse_message(), exec_replication_command(), exec_simple_query(), initialize_worker_spi(), LogicalRepApplyLoop(), parallel_vacuum_main(), ParallelQueryMain(), and PostgresMain().
void pgstat_report_analyze | ( | Relation | rel, |
PgStat_Counter | livetuples, | ||
PgStat_Counter | deadtuples, | ||
bool | resetcounter | ||
) |
Definition at line 1628 of file pgstat.c.
References GetCurrentTimestamp(), InvalidOid, IsAutoVacuumWorkerProcess(), PgStat_MsgAnalyze::m_analyzetime, PgStat_MsgAnalyze::m_autovacuum, PgStat_MsgAnalyze::m_databaseid, PgStat_MsgAnalyze::m_dead_tuples, PgStat_MsgAnalyze::m_hdr, PgStat_MsgAnalyze::m_live_tuples, PgStat_MsgAnalyze::m_resetcounter, PgStat_MsgAnalyze::m_tableoid, Max, MyDatabaseId, PGINVALID_SOCKET, RelationData::pgstat_info, PGSTAT_MTYPE_ANALYZE, pgstat_send(), pgstat_setheader(), pgstat_track_counts, pgStatSock, RelationData::rd_rel, RelationGetRelid, PgStat_TableStatus::t_counts, PgStat_TableCounts::t_delta_dead_tuples, PgStat_TableStatus::trans, trans, PgStat_TableXactStatus::tuples_deleted, PgStat_TableXactStatus::tuples_inserted, PgStat_TableXactStatus::tuples_updated, and PgStat_TableXactStatus::upper.
Referenced by do_analyze_rel().
void pgstat_report_appname | ( | const char * | appname | ) |
Definition at line 3552 of file pgstat.c.
References MyBEEntry, NAMEDATALEN, pg_mbcliplen(), PGSTAT_BEGIN_WRITE_ACTIVITY, PGSTAT_END_WRITE_ACTIVITY, and PgBackendStatus::st_appname.
Referenced by assign_application_name(), and pgstat_bestart().
void pgstat_report_autovac | ( | Oid | dboid | ) |
Definition at line 1578 of file pgstat.c.
References GetCurrentTimestamp(), PgStat_MsgAutovacStart::m_databaseid, PgStat_MsgAutovacStart::m_hdr, PgStat_MsgAutovacStart::m_start_time, PGINVALID_SOCKET, PGSTAT_MTYPE_AUTOVAC_START, pgstat_send(), pgstat_setheader(), and pgStatSock.
Referenced by AutoVacWorkerMain().
void pgstat_report_checksum_failure | ( | void | ) |
Definition at line 1744 of file pgstat.c.
References MyDatabaseId, and pgstat_report_checksum_failures_in_db().
Referenced by PageIsVerifiedExtended().
void pgstat_report_checksum_failures_in_db | ( | Oid | dboid, |
int | failurecount | ||
) |
Definition at line 1722 of file pgstat.c.
References GetCurrentTimestamp(), PgStat_MsgChecksumFailure::m_databaseid, PgStat_MsgChecksumFailure::m_failure_time, PgStat_MsgChecksumFailure::m_failurecount, PgStat_MsgChecksumFailure::m_hdr, PGINVALID_SOCKET, PGSTAT_MTYPE_CHECKSUMFAILURE, pgstat_send(), pgstat_setheader(), pgstat_track_counts, and pgStatSock.
Referenced by pgstat_report_checksum_failure(), and sendFile().
void pgstat_report_deadlock | ( | void | ) |
Definition at line 1701 of file pgstat.c.
References PgStat_MsgDeadlock::m_databaseid, PgStat_MsgDeadlock::m_hdr, MyDatabaseId, PGINVALID_SOCKET, PGSTAT_MTYPE_DEADLOCK, pgstat_send(), pgstat_setheader(), pgstat_track_counts, and pgStatSock.
Referenced by DeadLockReport().
void pgstat_report_recovery_conflict | ( | int | reason | ) |
Definition at line 1681 of file pgstat.c.
References PgStat_MsgRecoveryConflict::m_databaseid, PgStat_MsgRecoveryConflict::m_hdr, PgStat_MsgRecoveryConflict::m_reason, MyDatabaseId, PGINVALID_SOCKET, PGSTAT_MTYPE_RECOVERYCONFLICT, pgstat_send(), pgstat_setheader(), pgstat_track_counts, and pgStatSock.
Referenced by ProcessInterrupts().
void pgstat_report_replslot | ( | const char * | slotname, |
int | spilltxns, | ||
int | spillcount, | ||
int | spillbytes, | ||
int | streamtxns, | ||
int | streamcount, | ||
int | streambytes | ||
) |
Definition at line 1776 of file pgstat.c.
References PgStat_MsgReplSlot::m_drop, PgStat_MsgReplSlot::m_hdr, PgStat_MsgReplSlot::m_slotname, PgStat_MsgReplSlot::m_spill_bytes, PgStat_MsgReplSlot::m_spill_count, PgStat_MsgReplSlot::m_spill_txns, PgStat_MsgReplSlot::m_stream_bytes, PgStat_MsgReplSlot::m_stream_count, PgStat_MsgReplSlot::m_stream_txns, NAMEDATALEN, PGSTAT_MTYPE_REPLSLOT, pgstat_send(), pgstat_setheader(), and strlcpy().
Referenced by ReplicationSlotCreate(), and UpdateDecodingStats().
void pgstat_report_replslot_drop | ( | const char * | slotname | ) |
Definition at line 1803 of file pgstat.c.
References PgStat_MsgReplSlot::m_drop, PgStat_MsgReplSlot::m_hdr, PgStat_MsgReplSlot::m_slotname, NAMEDATALEN, PGSTAT_MTYPE_REPLSLOT, pgstat_send(), pgstat_setheader(), and strlcpy().
Referenced by ReplicationSlotDropPtr().
void pgstat_report_stat | ( | bool | force | ) |
Definition at line 870 of file pgstat.c.
References Assert, B_BACKEND, GetCurrentTransactionStopTimestamp(), hash_destroy(), have_function_stats, i, InvalidOid, PgStat_MsgTabstat::m_databaseid, PgStat_MsgTabstat::m_entry, PgStat_MsgTabstat::m_nentries, MemSet, MyBackendType, MyDatabaseId, now(), PGSTAT_NUM_TABENTRIES, pgstat_send_connstats(), pgstat_send_funcstats(), pgstat_send_slru(), pgstat_send_tabstat(), pgstat_send_wal(), PGSTAT_STAT_INTERVAL, pgStatXactCommit, pgStatXactRollback, PgStat_TableStatus::t_counts, PgStat_TableEntry::t_counts, PgStat_TableStatus::t_id, PgStat_TableEntry::t_id, PgStat_TableStatus::t_shared, TimestampDifferenceExceeds(), PgStat_TableStatus::trans, TabStatusArray::tsa_entries, TabStatusArray::tsa_next, and TabStatusArray::tsa_used.
Referenced by apply_handle_commit_internal(), initialize_worker_spi(), LogicalRepSyncTableStart(), pg_attribute_noreturn(), pgstat_beshutdown_hook(), PostgresMain(), and process_syncing_tables_for_apply().