|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "storage/standby.h"#include "utils/pgstat_internal.h"#include "utils/timestamp.h"
Go to the source code of this file.
Macros | |
| #define | PGSTAT_ACCUM_DBCOUNT(item) (sharedent)->stats.item += (pendingent)->item |
| #define PGSTAT_ACCUM_DBCOUNT | ( | item | ) | (sharedent)->stats.item += (pendingent)->item |
Definition at line 295 of file pgstat_database.c.
References fb(), pgStatXactCommit, and pgStatXactRollback.
Referenced by AtEOXact_PgStat().
| bool pgstat_database_flush_cb | ( | PgStat_EntryRef * | entry_ref, |
| bool | nowait | ||
| ) |
Definition at line 438 of file pgstat_database.c.
References Assert, fb(), PgStat_EntryRef::pending, PGSTAT_ACCUM_DBCOUNT, pgstat_lock_entry(), pgstat_unlock_entry(), and PgStat_EntryRef::shared_stats.
| void pgstat_database_reset_timestamp_cb | ( | PgStatShared_Common * | header, |
| TimestampTz | ts | ||
| ) |
Definition at line 503 of file pgstat_database.c.
Definition at line 44 of file pgstat_database.c.
References fb(), InvalidOid, pgstat_drop_transactional(), and PGSTAT_KIND_DATABASE.
Referenced by dropdb().
| PgStat_StatDBEntry * pgstat_fetch_stat_dbentry | ( | Oid | dboid | ) |
Definition at line 288 of file pgstat_database.c.
References InvalidOid, pgstat_fetch_entry(), and PGSTAT_KIND_DATABASE.
Referenced by do_start_worker(), pg_stat_get_db_checksum_failures(), pg_stat_get_db_checksum_last_failure(), pg_stat_get_db_conflict_all(), pg_stat_get_db_stat_reset_time(), and rebuild_database_list().
| PgStat_StatDBEntry * pgstat_prep_database_pending | ( | Oid | dboid | ) |
Definition at line 396 of file pgstat_database.c.
References Assert, fb(), InvalidOid, MyDatabaseId, OidIsValid, PgStat_EntryRef::pending, PGSTAT_KIND_DATABASE, and pgstat_prep_pending_entry().
Referenced by pgstat_relation_flush_cb(), pgstat_report_connect(), pgstat_report_deadlock(), pgstat_report_disconnect(), pgstat_report_recovery_conflict(), pgstat_report_tempfile(), pgstat_update_dbstats(), and pgstat_update_parallel_workers_stats().
Definition at line 155 of file pgstat_database.c.
References Assert, CritSectionCount, fb(), InvalidOid, pgstat_get_entry_ref(), and PGSTAT_KIND_DATABASE.
Referenced by AsyncReadBuffers(), read_rel_block_ll(), RelationCopyStorage(), and sendFile().
Definition at line 55 of file pgstat_database.c.
References Assert, fb(), GetCurrentTimestamp(), InvalidOid, IsUnderPostmaster, pgstat_get_entry_ref_locked(), PGSTAT_KIND_DATABASE, pgstat_unlock_entry(), and PgStat_EntryRef::shared_stats.
Referenced by AutoVacWorkerMain().
Definition at line 176 of file pgstat_database.c.
References Assert, elog, fb(), GetCurrentTimestamp(), InvalidOid, pgstat_get_entry_ref(), PGSTAT_KIND_DATABASE, pgstat_lock_entry(), pgstat_track_counts, pgstat_unlock_entry(), PgStat_EntryRef::shared_stats, and WARNING.
Referenced by buffer_readv_complete(), RelationCopyStorage(), sendFile(), and shared_buffer_readv_complete_local().
Definition at line 237 of file pgstat_database.c.
References fb(), MyDatabaseId, MyStartTimestamp, pgLastSessionReportTime, pgstat_prep_database_pending(), and pgstat_should_report_connstat().
Referenced by PostgresMain().
Definition at line 135 of file pgstat_database.c.
References fb(), MyDatabaseId, pgstat_prep_database_pending(), and pgstat_track_counts.
Referenced by DeadLockReport().
Definition at line 254 of file pgstat_database.c.
References DISCONNECT_CLIENT_EOF, DISCONNECT_FATAL, DISCONNECT_KILLED, DISCONNECT_NORMAL, DISCONNECT_NOT_YET, fb(), MyDatabaseId, pgstat_prep_database_pending(), pgstat_should_report_connstat(), and pgStatSessionEndCause.
Referenced by pgstat_shutdown_hook().
Definition at line 81 of file pgstat_database.c.
References Assert, fb(), IsUnderPostmaster, MyDatabaseId, pgstat_prep_database_pending(), pgstat_track_counts, RECOVERY_CONFLICT_BUFFERPIN, RECOVERY_CONFLICT_BUFFERPIN_DEADLOCK, RECOVERY_CONFLICT_DATABASE, RECOVERY_CONFLICT_LOCK, RECOVERY_CONFLICT_LOGICALSLOT, RECOVERY_CONFLICT_SNAPSHOT, RECOVERY_CONFLICT_STARTUP_DEADLOCK, and RECOVERY_CONFLICT_TABLESPACE.
Referenced by report_recovery_conflict().
Definition at line 221 of file pgstat_database.c.
References fb(), MyDatabaseId, pgstat_prep_database_pending(), and pgstat_track_counts.
Referenced by ReportTemporaryFileUsage().
| void pgstat_reset_database_timestamp | ( | Oid | dboid, |
| TimestampTz | ts | ||
| ) |
Definition at line 417 of file pgstat_database.c.
References fb(), InvalidOid, MyDatabaseId, pgstat_get_entry_ref_locked(), PGSTAT_KIND_DATABASE, and pgstat_unlock_entry().
Referenced by pgstat_reset().
Definition at line 387 of file pgstat_database.c.
References B_BACKEND, and MyBackendType.
Referenced by pgstat_report_connect(), pgstat_report_disconnect(), and pgstat_update_dbstats().
| void pgstat_update_dbstats | ( | TimestampTz | ts | ) |
Definition at line 333 of file pgstat_database.c.
References fb(), MyDatabaseId, OidIsValid, pgLastSessionReportTime, pgstat_prep_database_pending(), pgstat_should_report_connstat(), pgStatActiveTime, pgStatBlockReadTime, pgStatBlockWriteTime, pgStatTransactionIdleTime, pgStatXactCommit, pgStatXactRollback, and TimestampDifference().
Referenced by pgstat_report_stat().
| void pgstat_update_parallel_workers_stats | ( | PgStat_Counter | workers_to_launch, |
| PgStat_Counter | workers_launched | ||
| ) |
Definition at line 315 of file pgstat_database.c.
References fb(), MyDatabaseId, OidIsValid, and pgstat_prep_database_pending().
Referenced by standard_ExecutorEnd().
|
static |
Definition at line 37 of file pgstat_database.c.
Referenced by pgstat_report_connect(), and pgstat_update_dbstats().
| PgStat_Counter pgStatActiveTime = 0 |
Definition at line 30 of file pgstat_database.c.
Referenced by pgstat_update_dbstats().
| PgStat_Counter pgStatBlockReadTime = 0 |
Definition at line 28 of file pgstat_database.c.
Referenced by do_analyze_rel(), heap_vacuum_rel(), and pgstat_update_dbstats().
| PgStat_Counter pgStatBlockWriteTime = 0 |
Definition at line 29 of file pgstat_database.c.
Referenced by do_analyze_rel(), heap_vacuum_rel(), and pgstat_update_dbstats().
| SessionEndType pgStatSessionEndCause = DISCONNECT_NORMAL |
Definition at line 32 of file pgstat_database.c.
Referenced by die(), errfinish(), pgstat_report_disconnect(), and PostgresMain().
| PgStat_Counter pgStatTransactionIdleTime = 0 |
Definition at line 31 of file pgstat_database.c.
Referenced by pgstat_update_dbstats().
|
static |
Definition at line 35 of file pgstat_database.c.
Referenced by AtEOXact_PgStat_Database(), and pgstat_update_dbstats().
|
static |
Definition at line 36 of file pgstat_database.c.
Referenced by AtEOXact_PgStat_Database(), and pgstat_update_dbstats().