mirror of
https://github.com/postgres/postgres.git
synced 2025-07-14 08:21:07 +03:00
Show shared object statistics in pg_stat_database
This adds a row to the pg_stat_database view with datoid 0 and datname NULL for those objects that are not in a database. This was added particularly for checksums, but we were already tracking more satistics for these objects, just not returning it. Also add a checksum_last_failure column that holds the timestamptz of the last checksum failure that occurred in a database (or in a non-dataabase file), if any. Author: Julien Rouhaud <rjuju123@gmail.com>
This commit is contained in:
@ -541,6 +541,7 @@ typedef struct PgStat_MsgChecksumFailure
|
||||
PgStat_MsgHdr m_hdr;
|
||||
Oid m_databaseid;
|
||||
int m_failurecount;
|
||||
TimestampTz m_failure_time;
|
||||
} PgStat_MsgChecksumFailure;
|
||||
|
||||
|
||||
@ -607,6 +608,7 @@ typedef struct PgStat_StatDBEntry
|
||||
PgStat_Counter n_temp_bytes;
|
||||
PgStat_Counter n_deadlocks;
|
||||
PgStat_Counter n_checksum_failures;
|
||||
TimestampTz last_checksum_failure;
|
||||
PgStat_Counter n_block_read_time; /* times in microseconds */
|
||||
PgStat_Counter n_block_write_time;
|
||||
|
||||
|
Reference in New Issue
Block a user