Skip to content
Snippets Groups Projects
  • Tom Lane's avatar
    27c3e3de
    Remove redundant gettimeofday() calls to the extent practical without · 27c3e3de
    Tom Lane authored
    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.
    27c3e3de
    History
    Remove redundant gettimeofday() calls to the extent practical without
    Tom Lane authored
    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.