Converge all SQL-level statistics timing values to float8 milliseconds.
This patch adjusts the core statistics views to match the decision already taken for pg_stat_statements, that values representing elapsed time should be represented as float8 and measured in milliseconds. By using float8, we are no longer tied to a specific maximum precision of timing data. (Internally, it's still microseconds, but we could now change that without needing changes at the SQL level.) The columns affected are pg_stat_bgwriter.checkpoint_write_time pg_stat_bgwriter.checkpoint_sync_time pg_stat_database.blk_read_time pg_stat_database.blk_write_time pg_stat_user_functions.total_time pg_stat_user_functions.self_time pg_stat_xact_user_functions.total_time pg_stat_xact_user_functions.self_time The first four of these are new in 9.2, so there is no compatibility issue from changing them. The others require a release note comment that they are now double precision (and can show a fractional part) rather than bigint as before; also their underlying statistics functions now match the column definitions, instead of returning bigint microseconds.
Showing
- doc/src/sgml/monitoring.sgml 6 additions, 8 deletionsdoc/src/sgml/monitoring.sgml
- src/backend/access/transam/xlog.c 1 addition, 2 deletionssrc/backend/access/transam/xlog.c
- src/backend/catalog/system_views.sql 6 additions, 6 deletionssrc/backend/catalog/system_views.sql
- src/backend/postmaster/pgstat.c 15 additions, 15 deletionssrc/backend/postmaster/pgstat.c
- src/backend/utils/adt/pgstatfuncs.c 22 additions, 16 deletionssrc/backend/utils/adt/pgstatfuncs.c
- src/include/catalog/catversion.h 1 addition, 1 deletionsrc/include/catalog/catversion.h
- src/include/catalog/pg_proc.h 16 additions, 16 deletionssrc/include/catalog/pg_proc.h
- src/include/pgstat.h 10 additions, 11 deletionssrc/include/pgstat.h
- src/test/regress/expected/rules.out 3 additions, 3 deletionssrc/test/regress/expected/rules.out
Loading
Please register or sign in to comment