-
- Downloads
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.
Showing
- src/backend/access/transam/xact.c 8 additions, 5 deletionssrc/backend/access/transam/xact.c
- src/backend/commands/prepare.c 2 additions, 2 deletionssrc/backend/commands/prepare.c
- src/backend/postmaster/pgstat.c 9 additions, 3 deletionssrc/backend/postmaster/pgstat.c
- src/backend/postmaster/postmaster.c 9 additions, 5 deletionssrc/backend/postmaster/postmaster.c
- src/backend/storage/lmgr/proc.c 40 additions, 33 deletionssrc/backend/storage/lmgr/proc.c
- src/backend/tcop/postgres.c 122 additions, 165 deletionssrc/backend/tcop/postgres.c
- src/backend/utils/adt/timestamp.c 55 additions, 1 deletionsrc/backend/utils/adt/timestamp.c
- src/backend/utils/error/elog.c 4 additions, 5 deletionssrc/backend/utils/error/elog.c
- src/backend/utils/mmgr/portalmem.c 2 additions, 2 deletionssrc/backend/utils/mmgr/portalmem.c
- src/include/libpq/libpq-be.h 6 additions, 3 deletionssrc/include/libpq/libpq-be.h
- src/include/utils/timestamp.h 11 additions, 1 deletionsrc/include/utils/timestamp.h
Loading
Please register or sign in to comment