aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/mmgr/portalmem.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-06-20 22:52:00 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-06-20 22:52:00 +0000
commit27c3e3de0939d93ae8adb50ab7e00c4a5ff2fa0d (patch)
tree49a0c81851952447af7bcace3f37e1d7b77c4854 /src/backend/utils/mmgr/portalmem.c
parent47a37aeebdbeb5c242141830586e065256a0aaf6 (diff)
downloadpostgresql-27c3e3de0939d93ae8adb50ab7e00c4a5ff2fa0d.tar.gz
postgresql-27c3e3de0939d93ae8adb50ab7e00c4a5ff2fa0d.zip
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/utils/mmgr/portalmem.c')
-rw-r--r--src/backend/utils/mmgr/portalmem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/mmgr/portalmem.c b/src/backend/utils/mmgr/portalmem.c
index 9af7a5f0d86..a32cad08d30 100644
--- a/src/backend/utils/mmgr/portalmem.c
+++ b/src/backend/utils/mmgr/portalmem.c
@@ -12,7 +12,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/mmgr/portalmem.c,v 1.87 2006/04/25 14:11:58 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/mmgr/portalmem.c,v 1.88 2006/06/20 22:52:00 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -202,7 +202,7 @@ CreatePortal(const char *name, bool allowDup, bool dupSilent)
portal->atStart = true;
portal->atEnd = true; /* disallow fetches until query is set */
portal->visible = true;
- portal->creation_time = GetCurrentTimestamp();
+ portal->creation_time = GetCurrentStatementStartTimestamp();
/* put portal in table (sets portal->name) */
PortalHashTableInsert(portal, name);