PostgreSQL Source Code git master
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
pgstat_database.c File Reference
#include "postgres.h"
#include "storage/procsignal.h"
#include "utils/pgstat_internal.h"
#include "utils/timestamp.h"
Include dependency graph for pgstat_database.c:

Go to the source code of this file.

Macros

#define PGSTAT_ACCUM_DBCOUNT(item)    (sharedent)->stats.item += (pendingent)->item
 

Functions

static bool pgstat_should_report_connstat (void)
 
void pgstat_drop_database (Oid databaseid)
 
void pgstat_report_autovac (Oid dboid)
 
void pgstat_report_recovery_conflict (int reason)
 
void pgstat_report_deadlock (void)
 
void pgstat_prepare_report_checksum_failure (Oid dboid)
 
void pgstat_report_checksum_failures_in_db (Oid dboid, int failurecount)
 
void pgstat_report_tempfile (size_t filesize)
 
void pgstat_report_connect (Oid dboid)
 
void pgstat_report_disconnect (Oid dboid)
 
PgStat_StatDBEntrypgstat_fetch_stat_dbentry (Oid dboid)
 
void AtEOXact_PgStat_Database (bool isCommit, bool parallel)
 
void pgstat_update_parallel_workers_stats (PgStat_Counter workers_to_launch, PgStat_Counter workers_launched)
 
void pgstat_update_dbstats (TimestampTz ts)
 
PgStat_StatDBEntrypgstat_prep_database_pending (Oid dboid)
 
void pgstat_reset_database_timestamp (Oid dboid, TimestampTz ts)
 
bool pgstat_database_flush_cb (PgStat_EntryRef *entry_ref, bool nowait)
 
void pgstat_database_reset_timestamp_cb (PgStatShared_Common *header, TimestampTz ts)
 

Variables

PgStat_Counter pgStatBlockReadTime = 0
 
PgStat_Counter pgStatBlockWriteTime = 0
 
PgStat_Counter pgStatActiveTime = 0
 
PgStat_Counter pgStatTransactionIdleTime = 0
 
SessionEndType pgStatSessionEndCause = DISCONNECT_NORMAL
 
static int pgStatXactCommit = 0
 
static int pgStatXactRollback = 0
 
static PgStat_Counter pgLastSessionReportTime = 0
 

Macro Definition Documentation

◆ PGSTAT_ACCUM_DBCOUNT

#define PGSTAT_ACCUM_DBCOUNT (   item)     (sharedent)->stats.item += (pendingent)->item

Function Documentation

◆ AtEOXact_PgStat_Database()

void AtEOXact_PgStat_Database ( bool  isCommit,
bool  parallel 
)

Definition at line 285 of file pgstat_database.c.

286{
287 /* Don't count parallel worker transaction stats */
288 if (!parallel)
289 {
290 /*
291 * Count transaction commit or abort. (We use counters, not just
292 * bools, in case the reporting message isn't sent right away.)
293 */
294 if (isCommit)
296 else
298 }
299}
static int pgStatXactCommit
static int pgStatXactRollback

References pgStatXactCommit, and pgStatXactRollback.

Referenced by AtEOXact_PgStat().

◆ pgstat_database_flush_cb()

bool pgstat_database_flush_cb ( PgStat_EntryRef entry_ref,
bool  nowait 
)

Definition at line 428 of file pgstat_database.c.

429{
430 PgStatShared_Database *sharedent;
431 PgStat_StatDBEntry *pendingent;
432
433 pendingent = (PgStat_StatDBEntry *) entry_ref->pending;
434 sharedent = (PgStatShared_Database *) entry_ref->shared_stats;
435
436 if (!pgstat_lock_entry(entry_ref, nowait))
437 return false;
438
439#define PGSTAT_ACCUM_DBCOUNT(item) \
440 (sharedent)->stats.item += (pendingent)->item
441
442 PGSTAT_ACCUM_DBCOUNT(xact_commit);
443 PGSTAT_ACCUM_DBCOUNT(xact_rollback);
444 PGSTAT_ACCUM_DBCOUNT(blocks_fetched);
445 PGSTAT_ACCUM_DBCOUNT(blocks_hit);
446
447 PGSTAT_ACCUM_DBCOUNT(tuples_returned);
448 PGSTAT_ACCUM_DBCOUNT(tuples_fetched);
449 PGSTAT_ACCUM_DBCOUNT(tuples_inserted);
450 PGSTAT_ACCUM_DBCOUNT(tuples_updated);
451 PGSTAT_ACCUM_DBCOUNT(tuples_deleted);
452
453 /* last_autovac_time is reported immediately */
454 Assert(pendingent->last_autovac_time == 0);
455
456 PGSTAT_ACCUM_DBCOUNT(conflict_tablespace);
457 PGSTAT_ACCUM_DBCOUNT(conflict_lock);
458 PGSTAT_ACCUM_DBCOUNT(conflict_snapshot);
459 PGSTAT_ACCUM_DBCOUNT(conflict_logicalslot);
460 PGSTAT_ACCUM_DBCOUNT(conflict_bufferpin);
461 PGSTAT_ACCUM_DBCOUNT(conflict_startup_deadlock);
462
463 PGSTAT_ACCUM_DBCOUNT(temp_bytes);
464 PGSTAT_ACCUM_DBCOUNT(temp_files);
465 PGSTAT_ACCUM_DBCOUNT(deadlocks);
466
467 /* checksum failures are reported immediately */
468 Assert(pendingent->checksum_failures == 0);
469 Assert(pendingent->last_checksum_failure == 0);
470
471 PGSTAT_ACCUM_DBCOUNT(blk_read_time);
472 PGSTAT_ACCUM_DBCOUNT(blk_write_time);
473
474 PGSTAT_ACCUM_DBCOUNT(sessions);
475 PGSTAT_ACCUM_DBCOUNT(session_time);
476 PGSTAT_ACCUM_DBCOUNT(active_time);
477 PGSTAT_ACCUM_DBCOUNT(idle_in_transaction_time);
478 PGSTAT_ACCUM_DBCOUNT(sessions_abandoned);
479 PGSTAT_ACCUM_DBCOUNT(sessions_fatal);
480 PGSTAT_ACCUM_DBCOUNT(sessions_killed);
481 PGSTAT_ACCUM_DBCOUNT(parallel_workers_to_launch);
482 PGSTAT_ACCUM_DBCOUNT(parallel_workers_launched);
483#undef PGSTAT_ACCUM_DBCOUNT
484
485 pgstat_unlock_entry(entry_ref);
486
487 memset(pendingent, 0, sizeof(*pendingent));
488
489 return true;
490}
Assert(PointerIsAligned(start, uint64))
#define PGSTAT_ACCUM_DBCOUNT(item)
void pgstat_unlock_entry(PgStat_EntryRef *entry_ref)
Definition: pgstat_shmem.c:684
bool pgstat_lock_entry(PgStat_EntryRef *entry_ref, bool nowait)
Definition: pgstat_shmem.c:654
PgStatShared_Common * shared_stats
TimestampTz last_checksum_failure
Definition: pgstat.h:364
TimestampTz last_autovac_time
Definition: pgstat.h:353
PgStat_Counter checksum_failures
Definition: pgstat.h:363

References Assert(), PgStat_StatDBEntry::checksum_failures, PgStat_StatDBEntry::last_autovac_time, PgStat_StatDBEntry::last_checksum_failure, PgStat_EntryRef::pending, PGSTAT_ACCUM_DBCOUNT, pgstat_lock_entry(), pgstat_unlock_entry(), and PgStat_EntryRef::shared_stats.

◆ pgstat_database_reset_timestamp_cb()

void pgstat_database_reset_timestamp_cb ( PgStatShared_Common header,
TimestampTz  ts 
)

Definition at line 493 of file pgstat_database.c.

494{
495 ((PgStatShared_Database *) header)->stats.stat_reset_timestamp = ts;
496}

◆ pgstat_drop_database()

void pgstat_drop_database ( Oid  databaseid)

Definition at line 44 of file pgstat_database.c.

45{
47}
#define PGSTAT_KIND_DATABASE
Definition: pgstat_kind.h:27
void pgstat_drop_transactional(PgStat_Kind kind, Oid dboid, uint64 objid)
Definition: pgstat_xact.c:384
#define InvalidOid
Definition: postgres_ext.h:35

References InvalidOid, pgstat_drop_transactional(), and PGSTAT_KIND_DATABASE.

Referenced by dropdb().

◆ pgstat_fetch_stat_dbentry()

PgStat_StatDBEntry * pgstat_fetch_stat_dbentry ( Oid  dboid)

◆ pgstat_prep_database_pending()

PgStat_StatDBEntry * pgstat_prep_database_pending ( Oid  dboid)

Definition at line 386 of file pgstat_database.c.

387{
388 PgStat_EntryRef *entry_ref;
389
390 /*
391 * This should not report stats on database objects before having
392 * connected to a database.
393 */
395
397 NULL);
398
399 return entry_ref->pending;
400}
#define OidIsValid(objectId)
Definition: c.h:746
Oid MyDatabaseId
Definition: globals.c:95
PgStat_EntryRef * pgstat_prep_pending_entry(PgStat_Kind kind, Oid dboid, uint64 objid, bool *created_entry)
Definition: pgstat.c:1283

References Assert(), 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().

◆ pgstat_prepare_report_checksum_failure()

void pgstat_prepare_report_checksum_failure ( Oid  dboid)

Definition at line 145 of file pgstat_database.c.

146{
148
149 /*
150 * Just need to ensure this backend has an entry ref for the database.
151 * That will allows us to report checksum failures without e.g. needing to
152 * map in DSM segments.
153 */
155 true, NULL);
156}
volatile uint32 CritSectionCount
Definition: globals.c:46
PgStat_EntryRef * pgstat_get_entry_ref(PgStat_Kind kind, Oid dboid, uint64 objid, bool create, bool *created_entry)
Definition: pgstat_shmem.c:444

References Assert(), CritSectionCount, InvalidOid, pgstat_get_entry_ref(), and PGSTAT_KIND_DATABASE.

Referenced by AsyncReadBuffers(), read_rel_block_ll(), RelationCopyStorage(), and sendFile().

◆ pgstat_report_autovac()

void pgstat_report_autovac ( Oid  dboid)

Definition at line 55 of file pgstat_database.c.

56{
57 PgStat_EntryRef *entry_ref;
58 PgStatShared_Database *dbentry;
59
60 /* can't get here in single user mode */
62
63 /*
64 * End-of-vacuum is reported instantly. Report the start the same way for
65 * consistency. Vacuum doesn't run frequently and is a long-lasting
66 * operation so it doesn't matter if we get blocked here a little.
67 */
69 dboid, InvalidOid, false);
70
71 dbentry = (PgStatShared_Database *) entry_ref->shared_stats;
73
74 pgstat_unlock_entry(entry_ref);
75}
TimestampTz GetCurrentTimestamp(void)
Definition: timestamp.c:1645
bool IsUnderPostmaster
Definition: globals.c:121
PgStat_EntryRef * pgstat_get_entry_ref_locked(PgStat_Kind kind, Oid dboid, uint64 objid, bool nowait)
Definition: pgstat_shmem.c:693
PgStat_StatDBEntry stats

References Assert(), GetCurrentTimestamp(), InvalidOid, IsUnderPostmaster, PgStat_StatDBEntry::last_autovac_time, pgstat_get_entry_ref_locked(), PGSTAT_KIND_DATABASE, pgstat_unlock_entry(), PgStat_EntryRef::shared_stats, and PgStatShared_Database::stats.

Referenced by AutoVacWorkerMain().

◆ pgstat_report_checksum_failures_in_db()

void pgstat_report_checksum_failures_in_db ( Oid  dboid,
int  failurecount 
)

Definition at line 166 of file pgstat_database.c.

167{
168 PgStat_EntryRef *entry_ref;
169 PgStatShared_Database *sharedent;
170
172 return;
173
174 /*
175 * Update the shared stats directly - checksum failures should never be
176 * common enough for that to be a problem. Note that we pass create=false
177 * here, as we want to be sure to not require memory allocations, so this
178 * can be called in critical sections.
179 */
181 false, NULL);
182
183 /*
184 * Should always have been created by
185 * pgstat_prepare_report_checksum_failure().
186 *
187 * When not using assertions, we don't want to crash should something have
188 * gone wrong, so just return.
189 */
190 Assert(entry_ref);
191 if (!entry_ref)
192 {
193 elog(WARNING, "could not report %d conflicts for DB %u",
194 failurecount, dboid);
195 return;
196 }
197
198 (void) pgstat_lock_entry(entry_ref, false);
199
200 sharedent = (PgStatShared_Database *) entry_ref->shared_stats;
201 sharedent->stats.checksum_failures += failurecount;
203
204 pgstat_unlock_entry(entry_ref);
205}
#define WARNING
Definition: elog.h:36
#define elog(elevel,...)
Definition: elog.h:226
bool pgstat_track_counts
Definition: pgstat.c:203

References Assert(), PgStat_StatDBEntry::checksum_failures, elog, GetCurrentTimestamp(), InvalidOid, PgStat_StatDBEntry::last_checksum_failure, pgstat_get_entry_ref(), PGSTAT_KIND_DATABASE, pgstat_lock_entry(), pgstat_track_counts, pgstat_unlock_entry(), PgStat_EntryRef::shared_stats, PgStatShared_Database::stats, and WARNING.

Referenced by buffer_readv_complete(), RelationCopyStorage(), sendFile(), and shared_buffer_readv_complete_local().

◆ pgstat_report_connect()

void pgstat_report_connect ( Oid  dboid)

Definition at line 227 of file pgstat_database.c.

228{
229 PgStat_StatDBEntry *dbentry;
230
232 return;
233
235
237 dbentry->sessions++;
238}
TimestampTz MyStartTimestamp
Definition: globals.c:50
static bool pgstat_should_report_connstat(void)
static PgStat_Counter pgLastSessionReportTime
PgStat_StatDBEntry * pgstat_prep_database_pending(Oid dboid)
PgStat_Counter sessions
Definition: pgstat.h:367

References MyDatabaseId, MyStartTimestamp, pgLastSessionReportTime, pgstat_prep_database_pending(), pgstat_should_report_connstat(), and PgStat_StatDBEntry::sessions.

Referenced by PostgresMain().

◆ pgstat_report_deadlock()

void pgstat_report_deadlock ( void  )

Definition at line 125 of file pgstat_database.c.

126{
127 PgStat_StatDBEntry *dbent;
128
130 return;
131
133 dbent->deadlocks++;
134}
PgStat_Counter deadlocks
Definition: pgstat.h:362

References PgStat_StatDBEntry::deadlocks, MyDatabaseId, pgstat_prep_database_pending(), and pgstat_track_counts.

Referenced by DeadLockReport().

◆ pgstat_report_disconnect()

void pgstat_report_disconnect ( Oid  dboid)

Definition at line 244 of file pgstat_database.c.

245{
246 PgStat_StatDBEntry *dbentry;
247
249 return;
250
252
253 switch (pgStatSessionEndCause)
254 {
257 /* we don't collect these */
258 break;
260 dbentry->sessions_abandoned++;
261 break;
262 case DISCONNECT_FATAL:
263 dbentry->sessions_fatal++;
264 break;
266 dbentry->sessions_killed++;
267 break;
268 }
269}
@ DISCONNECT_NOT_YET
Definition: pgstat.h:54
@ DISCONNECT_FATAL
Definition: pgstat.h:57
@ DISCONNECT_KILLED
Definition: pgstat.h:58
@ DISCONNECT_CLIENT_EOF
Definition: pgstat.h:56
@ DISCONNECT_NORMAL
Definition: pgstat.h:55
SessionEndType pgStatSessionEndCause
PgStat_Counter sessions_fatal
Definition: pgstat.h:372
PgStat_Counter sessions_abandoned
Definition: pgstat.h:371
PgStat_Counter sessions_killed
Definition: pgstat.h:373

References DISCONNECT_CLIENT_EOF, DISCONNECT_FATAL, DISCONNECT_KILLED, DISCONNECT_NORMAL, DISCONNECT_NOT_YET, MyDatabaseId, pgstat_prep_database_pending(), pgstat_should_report_connstat(), pgStatSessionEndCause, PgStat_StatDBEntry::sessions_abandoned, PgStat_StatDBEntry::sessions_fatal, and PgStat_StatDBEntry::sessions_killed.

Referenced by pgstat_shutdown_hook().

◆ pgstat_report_recovery_conflict()

void pgstat_report_recovery_conflict ( int  reason)

Definition at line 81 of file pgstat_database.c.

82{
83 PgStat_StatDBEntry *dbentry;
84
87 return;
88
90
91 switch (reason)
92 {
94
95 /*
96 * Since we drop the information about the database as soon as it
97 * replicates, there is no point in counting these conflicts.
98 */
99 break;
101 dbentry->conflict_tablespace++;
102 break;
104 dbentry->conflict_lock++;
105 break;
107 dbentry->conflict_snapshot++;
108 break;
110 dbentry->conflict_bufferpin++;
111 break;
113 dbentry->conflict_logicalslot++;
114 break;
116 dbentry->conflict_startup_deadlock++;
117 break;
118 }
119}
@ PROCSIG_RECOVERY_CONFLICT_BUFFERPIN
Definition: procsignal.h:48
@ PROCSIG_RECOVERY_CONFLICT_LOCK
Definition: procsignal.h:45
@ PROCSIG_RECOVERY_CONFLICT_LOGICALSLOT
Definition: procsignal.h:47
@ PROCSIG_RECOVERY_CONFLICT_DATABASE
Definition: procsignal.h:43
@ PROCSIG_RECOVERY_CONFLICT_SNAPSHOT
Definition: procsignal.h:46
@ PROCSIG_RECOVERY_CONFLICT_TABLESPACE
Definition: procsignal.h:44
@ PROCSIG_RECOVERY_CONFLICT_STARTUP_DEADLOCK
Definition: procsignal.h:49
PgStat_Counter conflict_startup_deadlock
Definition: pgstat.h:359
PgStat_Counter conflict_lock
Definition: pgstat.h:355
PgStat_Counter conflict_snapshot
Definition: pgstat.h:356
PgStat_Counter conflict_bufferpin
Definition: pgstat.h:358
PgStat_Counter conflict_logicalslot
Definition: pgstat.h:357
PgStat_Counter conflict_tablespace
Definition: pgstat.h:354

References Assert(), PgStat_StatDBEntry::conflict_bufferpin, PgStat_StatDBEntry::conflict_lock, PgStat_StatDBEntry::conflict_logicalslot, PgStat_StatDBEntry::conflict_snapshot, PgStat_StatDBEntry::conflict_startup_deadlock, PgStat_StatDBEntry::conflict_tablespace, IsUnderPostmaster, MyDatabaseId, pgstat_prep_database_pending(), pgstat_track_counts, PROCSIG_RECOVERY_CONFLICT_BUFFERPIN, PROCSIG_RECOVERY_CONFLICT_DATABASE, PROCSIG_RECOVERY_CONFLICT_LOCK, PROCSIG_RECOVERY_CONFLICT_LOGICALSLOT, PROCSIG_RECOVERY_CONFLICT_SNAPSHOT, PROCSIG_RECOVERY_CONFLICT_STARTUP_DEADLOCK, and PROCSIG_RECOVERY_CONFLICT_TABLESPACE.

Referenced by ProcessRecoveryConflictInterrupt().

◆ pgstat_report_tempfile()

void pgstat_report_tempfile ( size_t  filesize)

Definition at line 211 of file pgstat_database.c.

212{
213 PgStat_StatDBEntry *dbent;
214
216 return;
217
219 dbent->temp_bytes += filesize;
220 dbent->temp_files++;
221}
PgStat_Counter temp_bytes
Definition: pgstat.h:361
PgStat_Counter temp_files
Definition: pgstat.h:360

References MyDatabaseId, pgstat_prep_database_pending(), pgstat_track_counts, PgStat_StatDBEntry::temp_bytes, and PgStat_StatDBEntry::temp_files.

Referenced by ReportTemporaryFileUsage().

◆ pgstat_reset_database_timestamp()

void pgstat_reset_database_timestamp ( Oid  dboid,
TimestampTz  ts 
)

◆ pgstat_should_report_connstat()

static bool pgstat_should_report_connstat ( void  )
static

Definition at line 377 of file pgstat_database.c.

378{
379 return MyBackendType == B_BACKEND;
380}
@ B_BACKEND
Definition: miscadmin.h:342
BackendType MyBackendType
Definition: miscinit.c:64

References B_BACKEND, and MyBackendType.

Referenced by pgstat_report_connect(), pgstat_report_disconnect(), and pgstat_update_dbstats().

◆ pgstat_update_dbstats()

void pgstat_update_dbstats ( TimestampTz  ts)

Definition at line 323 of file pgstat_database.c.

324{
325 PgStat_StatDBEntry *dbentry;
326
327 /*
328 * If not connected to a database yet, don't attribute time to "shared
329 * state" (InvalidOid is used to track stats for shared relations, etc.).
330 */
332 return;
333
335
336 /*
337 * Accumulate xact commit/rollback and I/O timings to stats entry of the
338 * current database.
339 */
340 dbentry->xact_commit += pgStatXactCommit;
344
346 {
347 long secs;
348 int usecs;
349
350 /*
351 * pgLastSessionReportTime is initialized to MyStartTimestamp by
352 * pgstat_report_connect().
353 */
356 dbentry->session_time += (PgStat_Counter) secs * 1000000 + usecs;
357 dbentry->active_time += pgStatActiveTime;
359 }
360
367}
void TimestampDifference(TimestampTz start_time, TimestampTz stop_time, long *secs, int *microsecs)
Definition: timestamp.c:1721
int64 PgStat_Counter
Definition: pgstat.h:65
PgStat_Counter pgStatActiveTime
PgStat_Counter pgStatBlockReadTime
PgStat_Counter pgStatBlockWriteTime
PgStat_Counter pgStatTransactionIdleTime
PgStat_Counter blk_write_time
Definition: pgstat.h:366
PgStat_Counter xact_rollback
Definition: pgstat.h:345
PgStat_Counter blk_read_time
Definition: pgstat.h:365
PgStat_Counter xact_commit
Definition: pgstat.h:344
PgStat_Counter session_time
Definition: pgstat.h:368
PgStat_Counter active_time
Definition: pgstat.h:369
PgStat_Counter idle_in_transaction_time
Definition: pgstat.h:370

References PgStat_StatDBEntry::active_time, PgStat_StatDBEntry::blk_read_time, PgStat_StatDBEntry::blk_write_time, PgStat_StatDBEntry::idle_in_transaction_time, MyDatabaseId, OidIsValid, pgLastSessionReportTime, pgstat_prep_database_pending(), pgstat_should_report_connstat(), pgStatActiveTime, pgStatBlockReadTime, pgStatBlockWriteTime, pgStatTransactionIdleTime, pgStatXactCommit, pgStatXactRollback, PgStat_StatDBEntry::session_time, TimestampDifference(), PgStat_StatDBEntry::xact_commit, and PgStat_StatDBEntry::xact_rollback.

Referenced by pgstat_report_stat().

◆ pgstat_update_parallel_workers_stats()

void pgstat_update_parallel_workers_stats ( PgStat_Counter  workers_to_launch,
PgStat_Counter  workers_launched 
)

Definition at line 305 of file pgstat_database.c.

307{
308 PgStat_StatDBEntry *dbentry;
309
311 return;
312
314 dbentry->parallel_workers_to_launch += workers_to_launch;
315 dbentry->parallel_workers_launched += workers_launched;
316}
PgStat_Counter parallel_workers_to_launch
Definition: pgstat.h:374
PgStat_Counter parallel_workers_launched
Definition: pgstat.h:375

References MyDatabaseId, OidIsValid, PgStat_StatDBEntry::parallel_workers_launched, PgStat_StatDBEntry::parallel_workers_to_launch, and pgstat_prep_database_pending().

Referenced by standard_ExecutorEnd().

Variable Documentation

◆ pgLastSessionReportTime

PgStat_Counter pgLastSessionReportTime = 0
static

Definition at line 37 of file pgstat_database.c.

Referenced by pgstat_report_connect(), and pgstat_update_dbstats().

◆ pgStatActiveTime

PgStat_Counter pgStatActiveTime = 0

Definition at line 30 of file pgstat_database.c.

Referenced by pgstat_update_dbstats().

◆ pgStatBlockReadTime

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().

◆ pgStatBlockWriteTime

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().

◆ pgStatSessionEndCause

SessionEndType pgStatSessionEndCause = DISCONNECT_NORMAL

Definition at line 32 of file pgstat_database.c.

Referenced by die(), errfinish(), pgstat_report_disconnect(), and PostgresMain().

◆ pgStatTransactionIdleTime

PgStat_Counter pgStatTransactionIdleTime = 0

Definition at line 31 of file pgstat_database.c.

Referenced by pgstat_update_dbstats().

◆ pgStatXactCommit

int pgStatXactCommit = 0
static

Definition at line 35 of file pgstat_database.c.

Referenced by AtEOXact_PgStat_Database(), and pgstat_update_dbstats().

◆ pgStatXactRollback

int pgStatXactRollback = 0
static

Definition at line 36 of file pgstat_database.c.

Referenced by AtEOXact_PgStat_Database(), and pgstat_update_dbstats().