Re: Add min and max execute statement time in pg_stat_statement - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Add min and max execute statement time in pg_stat_statement
Date
Msg-id 20141221182326.GA1768@alvh.no-ip.org
Whole thread Raw
In response to Re: Add min and max execute statement time in pg_stat_statement  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: Add min and max execute statement time in pg_stat_statement
Re: Add min and max execute statement time in pg_stat_statement
List pgsql-hackers
Andrew Dunstan wrote:

> On my blog Peter Geoghegan mentioned something about "atomic fetch-and-add"
> being useful here, but I'm not quite sure what that's referring to. Perhaps
> someone can give me a pointer.

The point, I think, is that without atomic instructions you have to hold
a lock while incrementing the counters.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: PrivateRefCount patch has got issues
Next
From: Andres Freund
Date:
Subject: Re: Add min and max execute statement time in pg_stat_statement