| From: | Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Greg Smith <greg(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Ragged latency log data in multi-threaded pgbench |
| Date: | 2010-03-16 02:13:37 |
| Message-ID: | 20100316111337.9C20.52131E4D@oss.ntt.co.jp |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> writes:
> > Oops. There might be two solutions for the issue:
> > 1. Use explicit locks. The lock primitive will be pthread_mutex for
> > multi-threaded implementations or semaphore for multi-threaded ones.
> > 2. Use per-thread log files.
> > File names would be "pgbench_log.<main-process-id>.<thread-id>".
>
> I think #1 is out of the question, as the synchronization overhead will
> do serious damage to the whole point of having a multithreaded pgbench.
> #2 might be a reasonable idea.
Ok, I'll go for #2.
Regards,
---
Takahiro Itagaki
NTT Open Source Software Center
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Takahiro Itagaki | 2010-03-16 03:09:14 | Re: Ragged latency log data in multi-threaded pgbench |
| Previous Message | Tom Lane | 2010-03-16 02:02:12 | Re: Ragged latency log data in multi-threaded pgbench |