You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: model.go
+14-4Lines changed: 14 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,7 @@ package pgmetrics
18
18
19
19
// ModelSchemaVersion is the schema version of the "Model" data structure
20
20
// defined below. It is in the "semver" notation. Version history:
21
+
// 1.10 - New fields in pg_stat_statements for Postgres 13
21
22
// 1.9 - Postgres 13, Citus support
22
23
// 1.8 - AWS RDS/EnhancedMonitoring metrics, index defn,
23
24
// backend type counts, slab memory (linux), user agent
@@ -515,10 +516,10 @@ type Statement struct {
515
516
QueryIDint64`json:"queryid"`// Internal hash code, computed from the statement's parse tree
516
517
Querystring`json:"query"`// Text of a representative statement
517
518
Callsint64`json:"calls"`// Number of times executed
518
-
TotalTimefloat64`json:"total_time"`// Total time spent in the statement, in milliseconds
519
-
MinTimefloat64`json:"min_time"`// Minimum time spent in the statement, in milliseconds
520
-
MaxTimefloat64`json:"max_time"`// Maximum time spent in the statement, in milliseconds
521
-
StddevTimefloat64`json:"stddev_time"`// Population standard deviation of time spent in the statement, in milliseconds
519
+
TotalTimefloat64`json:"total_time"`// Total time spent executing the statement, in milliseconds
520
+
MinTimefloat64`json:"min_time"`// Minimum time spent executing the statement, in milliseconds
521
+
MaxTimefloat64`json:"max_time"`// Maximum time spent executing the statement, in milliseconds
522
+
StddevTimefloat64`json:"stddev_time"`// Population standard deviation of time spent executing the statement, in milliseconds
522
523
Rowsint64`json:"rows"`// Total number of rows retrieved or affected by the statement
523
524
SharedBlksHitint64`json:"shared_blks_hit"`// Total number of shared block cache hits by the statement
524
525
SharedBlksReadint64`json:"shared_blks_read"`// Total number of shared blocks read by the statement
@@ -532,6 +533,15 @@ type Statement struct {
532
533
TempBlksWrittenint64`json:"temp_blks_written"`// Total number of temp blocks written by the statement
533
534
BlkReadTimefloat64`json:"blk_read_time"`// Total time the statement spent reading blocks, in milliseconds (if track_io_timing is enabled, otherwise zero)
534
535
BlkWriteTimefloat64`json:"blk_write_time"`// Total time the statement spent writing blocks, in milliseconds (if track_io_timing is enabled, otherwise zero)
536
+
// following fields present only in schema 1.10 and later (for Postgres v13+)
537
+
Plansint64`json:"plans"`// Number of times the statement was planned
538
+
TotalPlanTimefloat64`json:"total_plan_time"`// Total time spent planning the statement, in milliseconds
539
+
MinPlanTimefloat64`json:"min_plan_time"`// Minimum time spent planning the statement, in milliseconds
540
+
MaxPlanTimefloat64`json:"max_plan_time"`// Maximum time spent planning the statement, in milliseconds
541
+
StddevPlanTimefloat64`json:"stddev_plan_time"`// Population standard deviation of time spent planning the statement, in milliseconds
542
+
WALRecordsint64`json:"wal_records"`// Total number of WAL records generated by the statement
543
+
WALFPIint64`json:"wal_fpi"`// Total number of WAL full page images generated by the statement
544
+
WALBytesint64`json:"wal_bytes"`// Total amount of WAL bytes generated by the statement
535
545
}
536
546
537
547
// Publication represents a single v10+ publication. Added in schema 1.2.
0 commit comments