Re: Patch to show individual statement latencies in pgbench output

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Smith <greg(at)2ndquadrant(dot)com>
Cc: Florian Pflug <fgp(at)phlo(dot)org>, PostgreSQL-development hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Patch to show individual statement latencies in pgbench output
Date: 2010-08-12 21:19:00
Message-ID: 6143.1281647940@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greg Smith <greg(at)2ndquadrant(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2010-08-12 21:29:25 Re: including backend ID in relpath of temp rels - updated patch
Previous Message Robert Haas 2010-08-12 20:37:50 Re: [HACKERS] postgres 9.0 crash when bringing up hot standby