Re: Add min and max execute statement time in pg_stat_statement
| От | Tom Lane |
|---|---|
| Тема | Re: Add min and max execute statement time in pg_stat_statement |
| Дата | |
| Msg-id | 3276.1419189120@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Add min and max execute statement time in pg_stat_statement (Andrew Dunstan <andrew@dunslane.net>) |
| Ответы |
Re: Add min and max execute statement time in pg_stat_statement
|
| Список | pgsql-hackers |
Andrew Dunstan <andrew@dunslane.net> writes:
> On 12/21/2014 01:23 PM, Alvaro Herrera wrote:
>> The point, I think, is that without atomic instructions you have to hold
>> a lock while incrementing the counters.
> Hmm, do we do that now?
We already have a spinlock mutex around the counter adjustment code, so
I'm not sure why this discussion is being held.
> I would like someone more versed in numerical analysis than me to
> tell me how safe using sum of squares actually is in our case.
That, on the other hand, might be a real issue. I'm afraid that
accumulating across a very long series of statements could lead
to severe roundoff error in the reported values, unless we use
a method chosen for numerical stability.
regards, tom lane
В списке pgsql-hackers по дате отправления: