From: | Hannu Krosing <hannu(at)skype(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: Getting rid of extra gettimeofday() calls |
Date: | 2006-06-19 21:16:38 |
Message-ID: | 1150751798.5582.3.camel@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Ühel kenal päeval, E, 2006-06-19 kell 11:17, kirjutas Tom Lane:
> As of CVS tip, PG does up to four separate gettimeofday() calls upon the
> arrival of a new client command. This is because the statement_timestamp,
> stats_command_string, log_duration, and statement_timeout features each
> independently save an indication of statement start time. Given what
> we've found out recently about gettimeofday() being unduly expensive on
> some hardware, this cries out to get fixed. I propose that we do
> SetCurrentStatementStartTimestamp() immediately upon receiving a client
> message, and then make the other features copy that value instead of
> fetching their own.
>
> Another gettimeofday() call that I would like to get rid of is the one
> currently done at the end of statement when stats_command_string is
> enabled: we record current time when resetting the activity_string to
> <IDLE>.
Is it just <IDLE> or also <IDLE in transaction> ?
If we are going to change things anyway, I'd like the latter to show the
time since start of transaction, so that I Would at least have an easy
way to write a transaction timeout script :)
I don't really care about what plain <IDLE> uses.
--
----------------
Hannu Krosing
Database Architect
Skype Technologies OÜ
Akadeemia tee 21 F, Tallinn, 12618, Estonia
Skype me: callto:hkrosing
Get Skype for free: http://www.skype.com
From | Date | Subject | |
---|---|---|---|
Next Message | Theo Schlossnagle | 2006-06-19 21:20:31 | Re: Generic Monitoring Framework Proposal |
Previous Message | Chris Browne | 2006-06-19 21:14:15 | Re: Generic Monitoring Framework Proposal |