mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
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.
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user