Re: Patch to show individual statement latencies in pgbench output - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Patch to show individual statement latencies in pgbench output
Date
Msg-id 6143.1281647940@sss.pgh.pa.us
Whole thread Raw
In response to Re: Patch to show individual statement latencies in pgbench output  (Greg Smith <greg@2ndquadrant.com>)
List 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 by date:

Previous
From: Robert Haas
Date:
Subject: Re: [ADMIN] postgres 9.0 crash when bringing up hot standby
Next
From: Alvaro Herrera
Date:
Subject: Re: including backend ID in relpath of temp rels - updated patch