| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | #ifndef PGSTAT_H |
| | #define PGSTAT_H |
| |
|
| | #include "datatype/timestamp.h" |
| | #include "portability/instr_time.h" |
| | #include "postmaster/pgarch.h" |
| | #include "utils/backend_progress.h" |
| | #include "utils/backend_status.h" |
| | #include "utils/relcache.h" |
| | #include "utils/wait_event.h" |
| |
|
| |
|
| | |
| | |
| | |
| | |
| | #define PGSTAT_STAT_PERMANENT_DIRECTORY "pg_stat" |
| | #define PGSTAT_STAT_PERMANENT_FILENAME "pg_stat/pgstat.stat" |
| | #define PGSTAT_STAT_PERMANENT_TMPFILE "pg_stat/pgstat.tmp" |
| |
|
| | |
| | #define PG_STAT_TMP_DIR "pg_stat_tmp" |
| |
|
| | |
| | typedef enum PgStat_Kind |
| | { |
| | |
| | PGSTAT_KIND_INVALID = 0, |
| |
|
| | |
| | PGSTAT_KIND_DATABASE, |
| | PGSTAT_KIND_RELATION, |
| | PGSTAT_KIND_FUNCTION, |
| | PGSTAT_KIND_REPLSLOT, |
| | PGSTAT_KIND_SUBSCRIPTION, |
| |
|
| | |
| | PGSTAT_KIND_ARCHIVER, |
| | PGSTAT_KIND_BGWRITER, |
| | PGSTAT_KIND_CHECKPOINTER, |
| | PGSTAT_KIND_IO, |
| | PGSTAT_KIND_SLRU, |
| | PGSTAT_KIND_WAL, |
| | } PgStat_Kind; |
| |
|
| | #define PGSTAT_KIND_FIRST_VALID PGSTAT_KIND_DATABASE |
| | #define PGSTAT_KIND_LAST PGSTAT_KIND_WAL |
| | #define PGSTAT_NUM_KINDS (PGSTAT_KIND_LAST + 1) |
| |
|
| | |
| | typedef enum TrackFunctionsLevel |
| | { |
| | TRACK_FUNC_OFF, |
| | TRACK_FUNC_PL, |
| | TRACK_FUNC_ALL, |
| | } TrackFunctionsLevel; |
| |
|
| | typedef enum PgStat_FetchConsistency |
| | { |
| | PGSTAT_FETCH_CONSISTENCY_NONE, |
| | PGSTAT_FETCH_CONSISTENCY_CACHE, |
| | PGSTAT_FETCH_CONSISTENCY_SNAPSHOT, |
| | } PgStat_FetchConsistency; |
| |
|
| | |
| | typedef enum SessionEndType |
| | { |
| | DISCONNECT_NOT_YET, |
| | DISCONNECT_NORMAL, |
| | DISCONNECT_CLIENT_EOF, |
| | DISCONNECT_FATAL, |
| | DISCONNECT_KILLED, |
| | } SessionEndType; |
| |
|
| | |
| | |
| | |
| | |
| | typedef int64 PgStat_Counter; |
| |
|
| |
|
| | |
| | |
| | |
| | |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | typedef struct PgStat_FunctionCounts |
| | { |
| | PgStat_Counter numcalls; |
| | instr_time total_time; |
| | instr_time self_time; |
| | } PgStat_FunctionCounts; |
| |
|
| | |
| | |
| | |
| | typedef struct PgStat_FunctionCallUsage |
| | { |
| | |
| | |
| | PgStat_FunctionCounts *fs; |
| | |
| | instr_time save_f_total_time; |
| | |
| | instr_time save_total; |
| | |
| | instr_time start; |
| | } PgStat_FunctionCallUsage; |
| |
|
| | |
| | |
| | |
| | |
| | typedef struct PgStat_BackendSubEntry |
| | { |
| | PgStat_Counter apply_error_count; |
| | PgStat_Counter sync_error_count; |
| | } PgStat_BackendSubEntry; |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | typedef struct PgStat_TableCounts |
| | { |
| | PgStat_Counter numscans; |
| |
|
| | PgStat_Counter tuples_returned; |
| | PgStat_Counter tuples_fetched; |
| |
|
| | PgStat_Counter tuples_inserted; |
| | PgStat_Counter tuples_updated; |
| | PgStat_Counter tuples_deleted; |
| | PgStat_Counter tuples_hot_updated; |
| | PgStat_Counter tuples_newpage_updated; |
| | bool truncdropped; |
| |
|
| | PgStat_Counter delta_live_tuples; |
| | PgStat_Counter delta_dead_tuples; |
| | PgStat_Counter changed_tuples; |
| |
|
| | PgStat_Counter blocks_fetched; |
| | PgStat_Counter blocks_hit; |
| | } PgStat_TableCounts; |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | typedef struct PgStat_TableStatus |
| | { |
| | Oid id; |
| | bool shared; |
| | struct PgStat_TableXactStatus *trans; |
| | PgStat_TableCounts counts; |
| | Relation relation; |
| | } PgStat_TableStatus; |
| |
|
| | |
| | |
| | |
| | |
| | typedef struct PgStat_TableXactStatus |
| | { |
| | PgStat_Counter tuples_inserted; |
| | PgStat_Counter tuples_updated; |
| | PgStat_Counter tuples_deleted; |
| | bool truncdropped; |
| | |
| | |
| | PgStat_Counter inserted_pre_truncdrop; |
| | PgStat_Counter updated_pre_truncdrop; |
| | PgStat_Counter deleted_pre_truncdrop; |
| | int nest_level; |
| | |
| | struct PgStat_TableXactStatus *upper; |
| | PgStat_TableStatus *parent; |
| | |
| | struct PgStat_TableXactStatus *next; |
| | } PgStat_TableXactStatus; |
| |
|
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| |
|
| | #define PGSTAT_FILE_FORMAT_ID 0x01A5BCAC |
| |
|
| | typedef struct PgStat_ArchiverStats |
| | { |
| | PgStat_Counter archived_count; |
| | char last_archived_wal[MAX_XFN_CHARS + 1]; |
| | |
| | TimestampTz last_archived_timestamp; |
| | PgStat_Counter failed_count; |
| | char last_failed_wal[MAX_XFN_CHARS + 1]; |
| | |
| | TimestampTz last_failed_timestamp; |
| | TimestampTz stat_reset_timestamp; |
| | } PgStat_ArchiverStats; |
| |
|
| | typedef struct PgStat_BgWriterStats |
| | { |
| | PgStat_Counter buf_written_clean; |
| | PgStat_Counter maxwritten_clean; |
| | PgStat_Counter buf_alloc; |
| | TimestampTz stat_reset_timestamp; |
| | } PgStat_BgWriterStats; |
| |
|
| | typedef struct PgStat_CheckpointerStats |
| | { |
| | PgStat_Counter num_timed; |
| | PgStat_Counter num_requested; |
| | PgStat_Counter restartpoints_timed; |
| | PgStat_Counter restartpoints_requested; |
| | PgStat_Counter restartpoints_performed; |
| | PgStat_Counter write_time; |
| | PgStat_Counter sync_time; |
| | PgStat_Counter buffers_written; |
| | TimestampTz stat_reset_timestamp; |
| | } PgStat_CheckpointerStats; |
| |
|
| |
|
| | |
| | |
| | |
| | typedef enum IOObject |
| | { |
| | IOOBJECT_RELATION, |
| | IOOBJECT_TEMP_RELATION, |
| | } IOObject; |
| |
|
| | #define IOOBJECT_NUM_TYPES (IOOBJECT_TEMP_RELATION + 1) |
| |
|
| | typedef enum IOContext |
| | { |
| | IOCONTEXT_BULKREAD, |
| | IOCONTEXT_BULKWRITE, |
| | IOCONTEXT_NORMAL, |
| | IOCONTEXT_VACUUM, |
| | } IOContext; |
| |
|
| | #define IOCONTEXT_NUM_TYPES (IOCONTEXT_VACUUM + 1) |
| |
|
| | typedef enum IOOp |
| | { |
| | IOOP_EVICT, |
| | IOOP_EXTEND, |
| | IOOP_FSYNC, |
| | IOOP_HIT, |
| | IOOP_READ, |
| | IOOP_REUSE, |
| | IOOP_WRITE, |
| | IOOP_WRITEBACK, |
| | } IOOp; |
| |
|
| | #define IOOP_NUM_TYPES (IOOP_WRITEBACK + 1) |
| |
|
| | typedef struct PgStat_BktypeIO |
| | { |
| | PgStat_Counter counts[IOOBJECT_NUM_TYPES][IOCONTEXT_NUM_TYPES][IOOP_NUM_TYPES]; |
| | PgStat_Counter times[IOOBJECT_NUM_TYPES][IOCONTEXT_NUM_TYPES][IOOP_NUM_TYPES]; |
| | } PgStat_BktypeIO; |
| |
|
| | typedef struct PgStat_IO |
| | { |
| | TimestampTz stat_reset_timestamp; |
| | PgStat_BktypeIO stats[BACKEND_NUM_TYPES]; |
| | } PgStat_IO; |
| |
|
| |
|
| | typedef struct PgStat_StatDBEntry |
| | { |
| | PgStat_Counter xact_commit; |
| | PgStat_Counter xact_rollback; |
| | PgStat_Counter blocks_fetched; |
| | PgStat_Counter blocks_hit; |
| | PgStat_Counter tuples_returned; |
| | PgStat_Counter tuples_fetched; |
| | PgStat_Counter tuples_inserted; |
| | PgStat_Counter tuples_updated; |
| | PgStat_Counter tuples_deleted; |
| | TimestampTz last_autovac_time; |
| | PgStat_Counter conflict_tablespace; |
| | PgStat_Counter conflict_lock; |
| | PgStat_Counter conflict_snapshot; |
| | PgStat_Counter conflict_logicalslot; |
| | PgStat_Counter conflict_bufferpin; |
| | PgStat_Counter conflict_startup_deadlock; |
| | PgStat_Counter temp_files; |
| | PgStat_Counter temp_bytes; |
| | PgStat_Counter deadlocks; |
| | PgStat_Counter checksum_failures; |
| | TimestampTz last_checksum_failure; |
| | PgStat_Counter blk_read_time; |
| | PgStat_Counter blk_write_time; |
| | PgStat_Counter sessions; |
| | PgStat_Counter session_time; |
| | PgStat_Counter active_time; |
| | PgStat_Counter idle_in_transaction_time; |
| | PgStat_Counter sessions_abandoned; |
| | PgStat_Counter sessions_fatal; |
| | PgStat_Counter sessions_killed; |
| |
|
| | TimestampTz stat_reset_timestamp; |
| | } PgStat_StatDBEntry; |
| |
|
| | typedef struct PgStat_StatFuncEntry |
| | { |
| | PgStat_Counter numcalls; |
| |
|
| | PgStat_Counter total_time; |
| | PgStat_Counter self_time; |
| | } PgStat_StatFuncEntry; |
| |
|
| | typedef struct PgStat_StatReplSlotEntry |
| | { |
| | PgStat_Counter spill_txns; |
| | PgStat_Counter spill_count; |
| | PgStat_Counter spill_bytes; |
| | PgStat_Counter stream_txns; |
| | PgStat_Counter stream_count; |
| | PgStat_Counter stream_bytes; |
| | PgStat_Counter total_txns; |
| | PgStat_Counter total_bytes; |
| | TimestampTz stat_reset_timestamp; |
| | } PgStat_StatReplSlotEntry; |
| |
|
| | typedef struct PgStat_SLRUStats |
| | { |
| | PgStat_Counter blocks_zeroed; |
| | PgStat_Counter blocks_hit; |
| | PgStat_Counter blocks_read; |
| | PgStat_Counter blocks_written; |
| | PgStat_Counter blocks_exists; |
| | PgStat_Counter flush; |
| | PgStat_Counter truncate; |
| | TimestampTz stat_reset_timestamp; |
| | } PgStat_SLRUStats; |
| |
|
| | typedef struct PgStat_StatSubEntry |
| | { |
| | PgStat_Counter apply_error_count; |
| | PgStat_Counter sync_error_count; |
| | TimestampTz stat_reset_timestamp; |
| | } PgStat_StatSubEntry; |
| |
|
| | typedef struct PgStat_StatTabEntry |
| | { |
| | PgStat_Counter numscans; |
| | TimestampTz lastscan; |
| |
|
| | PgStat_Counter tuples_returned; |
| | PgStat_Counter tuples_fetched; |
| |
|
| | PgStat_Counter tuples_inserted; |
| | PgStat_Counter tuples_updated; |
| | PgStat_Counter tuples_deleted; |
| | PgStat_Counter tuples_hot_updated; |
| | PgStat_Counter tuples_newpage_updated; |
| |
|
| | PgStat_Counter live_tuples; |
| | PgStat_Counter dead_tuples; |
| | PgStat_Counter mod_since_analyze; |
| | PgStat_Counter ins_since_vacuum; |
| |
|
| | PgStat_Counter blocks_fetched; |
| | PgStat_Counter blocks_hit; |
| |
|
| | TimestampTz last_vacuum_time; |
| | PgStat_Counter vacuum_count; |
| | TimestampTz last_autovacuum_time; |
| | PgStat_Counter autovacuum_count; |
| | TimestampTz last_analyze_time; |
| | PgStat_Counter analyze_count; |
| | TimestampTz last_autoanalyze_time; |
| | PgStat_Counter autoanalyze_count; |
| | } PgStat_StatTabEntry; |
| |
|
| | typedef struct PgStat_WalStats |
| | { |
| | PgStat_Counter wal_records; |
| | PgStat_Counter wal_fpi; |
| | uint64 wal_bytes; |
| | PgStat_Counter wal_buffers_full; |
| | PgStat_Counter wal_write; |
| | PgStat_Counter wal_sync; |
| | PgStat_Counter wal_write_time; |
| | PgStat_Counter wal_sync_time; |
| | TimestampTz stat_reset_timestamp; |
| | } PgStat_WalStats; |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | typedef struct PgStat_PendingWalStats |
| | { |
| | PgStat_Counter wal_buffers_full; |
| | PgStat_Counter wal_write; |
| | PgStat_Counter wal_sync; |
| | instr_time wal_write_time; |
| | instr_time wal_sync_time; |
| | } PgStat_PendingWalStats; |
| |
|
| |
|
| | |
| | |
| | |
| |
|
| | |
| | extern Size StatsShmemSize(void); |
| | extern void StatsShmemInit(void); |
| |
|
| | |
| | extern void pgstat_restore_stats(void); |
| | extern void pgstat_discard_stats(void); |
| | extern void pgstat_before_server_shutdown(int code, Datum arg); |
| |
|
| | |
| | extern void pgstat_initialize(void); |
| |
|
| | |
| | extern long pgstat_report_stat(bool force); |
| | extern void pgstat_force_next_flush(void); |
| |
|
| | extern void pgstat_reset_counters(void); |
| | extern void pgstat_reset(PgStat_Kind kind, Oid dboid, Oid objoid); |
| | extern void pgstat_reset_of_kind(PgStat_Kind kind); |
| |
|
| | |
| | extern void pgstat_clear_snapshot(void); |
| | extern TimestampTz pgstat_get_stat_snapshot_timestamp(bool *have_snapshot); |
| |
|
| | |
| | extern PgStat_Kind pgstat_get_kind_from_str(char *kind_str); |
| | extern bool pgstat_have_entry(PgStat_Kind kind, Oid dboid, Oid objoid); |
| |
|
| |
|
| | |
| | |
| | |
| |
|
| | extern void pgstat_report_archiver(const char *xlog, bool failed); |
| | extern PgStat_ArchiverStats *pgstat_fetch_stat_archiver(void); |
| |
|
| |
|
| | |
| | |
| | |
| |
|
| | extern void pgstat_report_bgwriter(void); |
| | extern PgStat_BgWriterStats *pgstat_fetch_stat_bgwriter(void); |
| |
|
| |
|
| | |
| | |
| | |
| |
|
| | extern void pgstat_report_checkpointer(void); |
| | extern PgStat_CheckpointerStats *pgstat_fetch_stat_checkpointer(void); |
| |
|
| |
|
| | |
| | |
| | |
| |
|
| | extern bool pgstat_bktype_io_stats_valid(PgStat_BktypeIO *backend_io, |
| | BackendType bktype); |
| | extern void pgstat_count_io_op(IOObject io_object, IOContext io_context, IOOp io_op); |
| | extern void pgstat_count_io_op_n(IOObject io_object, IOContext io_context, IOOp io_op, uint32 cnt); |
| | extern instr_time pgstat_prepare_io_time(bool track_io_guc); |
| | extern void pgstat_count_io_op_time(IOObject io_object, IOContext io_context, |
| | IOOp io_op, instr_time start_time, uint32 cnt); |
| |
|
| | extern PgStat_IO *pgstat_fetch_stat_io(void); |
| | extern const char *pgstat_get_io_context_name(IOContext io_context); |
| | extern const char *pgstat_get_io_object_name(IOObject io_object); |
| |
|
| | extern bool pgstat_tracks_io_bktype(BackendType bktype); |
| | extern bool pgstat_tracks_io_object(BackendType bktype, |
| | IOObject io_object, IOContext io_context); |
| | extern bool pgstat_tracks_io_op(BackendType bktype, IOObject io_object, |
| | IOContext io_context, IOOp io_op); |
| |
|
| |
|
| | |
| | |
| | |
| |
|
| | extern void pgstat_drop_database(Oid databaseid); |
| | extern void pgstat_report_autovac(Oid dboid); |
| | extern void pgstat_report_recovery_conflict(int reason); |
| | extern void pgstat_report_deadlock(void); |
| | extern void pgstat_report_checksum_failures_in_db(Oid dboid, int failurecount); |
| | extern void pgstat_report_checksum_failure(void); |
| | extern void pgstat_report_connect(Oid dboid); |
| |
|
| | #define pgstat_count_buffer_read_time(n) \ |
| | (pgStatBlockReadTime += (n)) |
| | #define pgstat_count_buffer_write_time(n) \ |
| | (pgStatBlockWriteTime += (n)) |
| | #define pgstat_count_conn_active_time(n) \ |
| | (pgStatActiveTime += (n)) |
| | #define pgstat_count_conn_txn_idle_time(n) \ |
| | (pgStatTransactionIdleTime += (n)) |
| |
|
| | extern PgStat_StatDBEntry *pgstat_fetch_stat_dbentry(Oid dboid); |
| |
|
| |
|
| | |
| | |
| | |
| |
|
| | extern void pgstat_create_function(Oid proid); |
| | extern void pgstat_drop_function(Oid proid); |
| |
|
| | struct FunctionCallInfoBaseData; |
| | extern void pgstat_init_function_usage(struct FunctionCallInfoBaseData *fcinfo, |
| | PgStat_FunctionCallUsage *fcu); |
| | extern void pgstat_end_function_usage(PgStat_FunctionCallUsage *fcu, |
| | bool finalize); |
| |
|
| | extern PgStat_StatFuncEntry *pgstat_fetch_stat_funcentry(Oid func_id); |
| | extern PgStat_FunctionCounts *find_funcstat_entry(Oid func_id); |
| |
|
| |
|
| | |
| | |
| | |
| |
|
| | extern void pgstat_create_relation(Relation rel); |
| | extern void pgstat_drop_relation(Relation rel); |
| | extern void pgstat_copy_relation_stats(Relation dst, Relation src); |
| |
|
| | extern void pgstat_init_relation(Relation rel); |
| | extern void pgstat_assoc_relation(Relation rel); |
| | extern void pgstat_unlink_relation(Relation rel); |
| |
|
| | extern void pgstat_report_vacuum(Oid tableoid, bool shared, |
| | PgStat_Counter livetuples, PgStat_Counter deadtuples); |
| | extern void pgstat_report_analyze(Relation rel, |
| | PgStat_Counter livetuples, PgStat_Counter deadtuples, |
| | bool resetcounter); |
| |
|
| | |
| | |
| | |
| | |
| | |
| | #define pgstat_should_count_relation(rel) \ |
| | (likely((rel)->pgstat_info != NULL) ? true : \ |
| | ((rel)->pgstat_enabled ? pgstat_assoc_relation(rel), true : false)) |
| |
|
| | |
| |
|
| | #define pgstat_count_heap_scan(rel) \ |
| | do { \ |
| | if (pgstat_should_count_relation(rel)) \ |
| | (rel)->pgstat_info->counts.numscans++; \ |
| | } while (0) |
| | #define pgstat_count_heap_getnext(rel) \ |
| | do { \ |
| | if (pgstat_should_count_relation(rel)) \ |
| | (rel)->pgstat_info->counts.tuples_returned++; \ |
| | } while (0) |
| | #define pgstat_count_heap_fetch(rel) \ |
| | do { \ |
| | if (pgstat_should_count_relation(rel)) \ |
| | (rel)->pgstat_info->counts.tuples_fetched++; \ |
| | } while (0) |
| | #define pgstat_count_index_scan(rel) \ |
| | do { \ |
| | if (pgstat_should_count_relation(rel)) \ |
| | (rel)->pgstat_info->counts.numscans++; \ |
| | } while (0) |
| | #define pgstat_count_index_tuples(rel, n) \ |
| | do { \ |
| | if (pgstat_should_count_relation(rel)) \ |
| | (rel)->pgstat_info->counts.tuples_returned += (n); \ |
| | } while (0) |
| | #define pgstat_count_buffer_read(rel) \ |
| | do { \ |
| | if (pgstat_should_count_relation(rel)) \ |
| | (rel)->pgstat_info->counts.blocks_fetched++; \ |
| | } while (0) |
| | #define pgstat_count_buffer_hit(rel) \ |
| | do { \ |
| | if (pgstat_should_count_relation(rel)) \ |
| | (rel)->pgstat_info->counts.blocks_hit++; \ |
| | } while (0) |
| |
|
| | extern void pgstat_count_heap_insert(Relation rel, PgStat_Counter n); |
| | extern void pgstat_count_heap_update(Relation rel, bool hot, bool newpage); |
| | extern void pgstat_count_heap_delete(Relation rel); |
| | extern void pgstat_count_truncate(Relation rel); |
| | extern void pgstat_update_heap_dead_tuples(Relation rel, int delta); |
| |
|
| | extern void pgstat_twophase_postcommit(TransactionId xid, uint16 info, |
| | void *recdata, uint32 len); |
| | extern void pgstat_twophase_postabort(TransactionId xid, uint16 info, |
| | void *recdata, uint32 len); |
| |
|
| | extern PgStat_StatTabEntry *pgstat_fetch_stat_tabentry(Oid relid); |
| | extern PgStat_StatTabEntry *pgstat_fetch_stat_tabentry_ext(bool shared, |
| | Oid reloid); |
| | extern PgStat_TableStatus *find_tabstat_entry(Oid rel_id); |
| |
|
| |
|
| | |
| | |
| | |
| |
|
| | extern void pgstat_reset_replslot(const char *name); |
| | struct ReplicationSlot; |
| | extern void pgstat_report_replslot(struct ReplicationSlot *slot, const PgStat_StatReplSlotEntry *repSlotStat); |
| | extern void pgstat_create_replslot(struct ReplicationSlot *slot); |
| | extern void pgstat_acquire_replslot(struct ReplicationSlot *slot); |
| | extern void pgstat_drop_replslot(struct ReplicationSlot *slot); |
| | extern PgStat_StatReplSlotEntry *pgstat_fetch_replslot(NameData slotname); |
| |
|
| |
|
| | |
| | |
| | |
| |
|
| | extern void pgstat_reset_slru(const char *); |
| | extern void pgstat_count_slru_page_zeroed(int slru_idx); |
| | extern void pgstat_count_slru_page_hit(int slru_idx); |
| | extern void pgstat_count_slru_page_read(int slru_idx); |
| | extern void pgstat_count_slru_page_written(int slru_idx); |
| | extern void pgstat_count_slru_page_exists(int slru_idx); |
| | extern void pgstat_count_slru_flush(int slru_idx); |
| | extern void pgstat_count_slru_truncate(int slru_idx); |
| | extern const char *pgstat_get_slru_name(int slru_idx); |
| | extern int pgstat_get_slru_index(const char *name); |
| | extern PgStat_SLRUStats *pgstat_fetch_slru(void); |
| |
|
| |
|
| | |
| | |
| | |
| |
|
| | extern void pgstat_report_subscription_error(Oid subid, bool is_apply_error); |
| | extern void pgstat_create_subscription(Oid subid); |
| | extern void pgstat_drop_subscription(Oid subid); |
| | extern PgStat_StatSubEntry *pgstat_fetch_stat_subscription(Oid subid); |
| |
|
| |
|
| | |
| | |
| | |
| |
|
| | extern void AtEOXact_PgStat(bool isCommit, bool parallel); |
| | extern void AtEOSubXact_PgStat(bool isCommit, int nestDepth); |
| | extern void AtPrepare_PgStat(void); |
| | extern void PostPrepare_PgStat(void); |
| | struct xl_xact_stats_item; |
| | extern int pgstat_get_transactional_drops(bool isCommit, struct xl_xact_stats_item **items); |
| | extern void pgstat_execute_transactional_drops(int ndrops, struct xl_xact_stats_item *items, bool is_redo); |
| |
|
| |
|
| | |
| | |
| | |
| |
|
| | extern void pgstat_report_wal(bool force); |
| | extern PgStat_WalStats *pgstat_fetch_stat_wal(void); |
| |
|
| |
|
| | |
| | |
| | |
| |
|
| | |
| | extern PGDLLIMPORT bool pgstat_track_counts; |
| | extern PGDLLIMPORT int pgstat_track_functions; |
| | extern PGDLLIMPORT int pgstat_fetch_consistency; |
| |
|
| |
|
| | |
| | |
| | |
| |
|
| | |
| | extern PGDLLIMPORT PgStat_BgWriterStats PendingBgWriterStats; |
| |
|
| |
|
| | |
| | |
| | |
| |
|
| | |
| | |
| | |
| | |
| | extern PGDLLIMPORT PgStat_CheckpointerStats PendingCheckpointerStats; |
| |
|
| |
|
| | |
| | |
| | |
| |
|
| | |
| | extern PGDLLIMPORT PgStat_Counter pgStatBlockReadTime; |
| | extern PGDLLIMPORT PgStat_Counter pgStatBlockWriteTime; |
| |
|
| | |
| | |
| | |
| | |
| | extern PGDLLIMPORT PgStat_Counter pgStatActiveTime; |
| | extern PGDLLIMPORT PgStat_Counter pgStatTransactionIdleTime; |
| |
|
| | |
| | extern PGDLLIMPORT SessionEndType pgStatSessionEndCause; |
| |
|
| |
|
| | |
| | |
| | |
| |
|
| | |
| | extern PGDLLIMPORT PgStat_PendingWalStats PendingWalStats; |
| |
|
| |
|
| | #endif |
| |
|