diff options
| author | Tom Lane | 2006-06-20 22:52:00 +0000 |
|---|---|---|
| committer | Tom Lane | 2006-06-20 22:52:00 +0000 |
| commit | 27c3e3de0939d93ae8adb50ab7e00c4a5ff2fa0d (patch) | |
| tree | 49a0c81851952447af7bcace3f37e1d7b77c4854 /src/backend/commands | |
| parent | 47a37aeebdbeb5c242141830586e065256a0aaf6 (diff) | |
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.
Diffstat (limited to 'src/backend/commands')
| -rw-r--r-- | src/backend/commands/prepare.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/commands/prepare.c b/src/backend/commands/prepare.c index 3c77e8a70f..d89c01a62e 100644 --- a/src/backend/commands/prepare.c +++ b/src/backend/commands/prepare.c @@ -10,7 +10,7 @@ * Copyright (c) 2002-2006, PostgreSQL Global Development Group * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/prepare.c,v 1.52 2006/04/25 14:11:54 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/commands/prepare.c,v 1.53 2006/06/20 22:51:59 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -373,7 +373,7 @@ StorePreparedStatement(const char *stmt_name, entry->plan_list = plan_list; entry->argtype_list = argtype_list; entry->context = entrycxt; - entry->prepare_time = GetCurrentTimestamp(); + entry->prepare_time = GetCurrentStatementStartTimestamp(); entry->from_sql = from_sql; MemoryContextSwitchTo(oldcxt); |
