↑↓ select↵ open⌫ change scopeOpen full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Wiki / Statistics & Metrics

pg_stat_database.session_time

Time spent by database sessions in this database, in milliseconds (note that statistics are only updated when the state of a session changes, so if sessions have been idle for a long time, this idle time won't be included)

Reading PG 18·Select a recorded version

View
pg_stat_database
Field
session_time
SQL type
double precision
Units named in the field definition
milliseconds
Reset observation
Time at which these statistics were last reset
documented
true
field
session_time
manual path
/docs/18/monitoring-stats.html
signature
SELECT session_time FROM pg_catalog.pg_stat_database;
source only
false
sql type
double precision
units mentioned
milliseconds
view
pg_stat_database

Definition PG 18

Time spent by database sessions in this database, in milliseconds (note that statistics are only updated when the state of a session changes, so if sessions have been idle for a long time, this idle time won't be included)

Compare versions

Source references

Full definition and evidence JSON

Definition sources

center · PostgreSQL 18 · 555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f

Text language: en · 555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f