Re: Getting rid of extra gettimeofday() calls - Mailing list pgsql-hackers

From Jim C. Nasby
Subject Re: Getting rid of extra gettimeofday() calls
Date
Msg-id 20060619174513.GX93655@pervasive.com
Whole thread Raw
In response to Getting rid of extra gettimeofday() calls  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, Jun 19, 2006 at 11:17:48AM -0400, Tom Lane wrote:
> instead?  The effect would be that for an idle backend,
> pg_stat_activity.query_start would reflect the start time of its latest
> query instead of the time at which it finished the query.  I can see
> some use for the current behavior but I don't really think it's worth
> the overhead of a gettimeofday() call.

Perhaps make it a compile-time option... I suspect that there's people
making use of that info in their monitoring tools. Though, those people
are probably also likely to have log_duration=true, so maybe the same
trick of gettimeofday() once at statement end and copying it as needed
would work.
-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461


pgsql-hackers by date:

Previous
From: Florian Weimer
Date:
Subject: Re: sync_file_range()
Next
From: Greg Stark
Date:
Subject: Re: sync_file_range()