pgsql: Remove redundant gettimeofday() calls to the extent practical

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Remove redundant gettimeofday() calls to the extent practical
Date: 2006-06-20 22:52:00
Message-ID: 20060620225200.D028A9FA2B1@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
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.

Modified Files:
--------------
pgsql/src/backend/access/transam:
xact.c (r1.220 -> r1.221)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/xact.c.diff?r1=1.220&r2=1.221)
pgsql/src/backend/commands:
prepare.c (r1.52 -> r1.53)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/prepare.c.diff?r1=1.52&r2=1.53)
pgsql/src/backend/postmaster:
pgstat.c (r1.129 -> r1.130)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/pgstat.c.diff?r1=1.129&r2=1.130)
postmaster.c (r1.487 -> r1.488)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/postmaster.c.diff?r1=1.487&r2=1.488)
pgsql/src/backend/storage/lmgr:
proc.c (r1.174 -> r1.175)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/lmgr/proc.c.diff?r1=1.174&r2=1.175)
pgsql/src/backend/tcop:
postgres.c (r1.488 -> r1.489)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/tcop/postgres.c.diff?r1=1.488&r2=1.489)
pgsql/src/backend/utils/adt:
timestamp.c (r1.163 -> r1.164)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/timestamp.c.diff?r1=1.163&r2=1.164)
pgsql/src/backend/utils/error:
elog.c (r1.169 -> r1.170)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/error/elog.c.diff?r1=1.169&r2=1.170)
pgsql/src/backend/utils/mmgr:
portalmem.c (r1.87 -> r1.88)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/mmgr/portalmem.c.diff?r1=1.87&r2=1.88)
pgsql/src/include/libpq:
libpq-be.h (r1.55 -> r1.56)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/libpq/libpq-be.h.diff?r1=1.55&r2=1.56)
pgsql/src/include/utils:
timestamp.h (r1.60 -> r1.61)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/timestamp.h.diff?r1=1.60&r2=1.61)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Meskes 2006-06-21 10:24:41 pgsql: Added fixed from the coverity report send in by Joachim Wieland
Previous Message Tom Lane 2006-06-20 19:56:53 pgsql: Split definitions for md5.c out of crypt.h and into their own