]> granicus.if.org Git - postgresql/commit
Remove redundant gettimeofday() calls to the extent practical without
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 20 Jun 2006 22:52:00 +0000 (22:52 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 20 Jun 2006 22:52:00 +0000 (22:52 +0000)
commit27c3e3de0939d93ae8adb50ab7e00c4a5ff2fa0d
tree49a0c81851952447af7bcace3f37e1d7b77c4854
parent47a37aeebdbeb5c242141830586e065256a0aaf6
Remove redundant gettimeofday() calls to the extent practical without
changing semantics too much.  statement_timestamp is now set immediately
upon receipt of a client command message, and the various places that used
to do their own gettimeofday() calls to mark command startup are referenced
to that instead.  I have also made stats_command_string use that same
value for pg_stat_activity.query_start for both the command itself and
its eventual replacement by <IDLE> or <idle in transaction>.  There was
some debate about that, but no argument that seemed convincing enough to
justify an extra gettimeofday() call.
src/backend/access/transam/xact.c
src/backend/commands/prepare.c
src/backend/postmaster/pgstat.c
src/backend/postmaster/postmaster.c
src/backend/storage/lmgr/proc.c
src/backend/tcop/postgres.c
src/backend/utils/adt/timestamp.c
src/backend/utils/error/elog.c
src/backend/utils/mmgr/portalmem.c
src/include/libpq/libpq-be.h
src/include/utils/timestamp.h