Re: Patch to show individual statement latencies in pgbench output
| От | Tom Lane |
|---|---|
| Тема | Re: Patch to show individual statement latencies in pgbench output |
| Дата | |
| Msg-id | 6143.1281647940@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Patch to show individual statement latencies in pgbench output (Greg Smith <greg@2ndquadrant.com>) |
| Список | pgsql-hackers |
Greg Smith <greg@2ndquadrant.com> writes:
> I've attached a v5. No real code changes from Florian's version, just
> some wording/style fixes and rework on the documentation.
I've committed this with some editorialization. The main non-cosmetic
change was that I pulled the latency statistics counters out of the
per-Command data structures and put them into per-thread arrays instead.
I did this for two reasons:
1. Having different threads munging adjacent array entries without any
locking makes me itch. On some platforms that could possibly fail
entirely, and in any case it's likely to be a performance hit on
machines where processors lock whole cache lines (which is most of them
these days, I think).
2. It should make it a lot easier to pass the per-thread results back up
to the parent in a fork-based implementation, should anyone desire to
fix the limitation I mentioned before.
regards, tom lane
В списке pgsql-hackers по дате отправления: