Re: Ragged latency log data in multi-threaded pgbench

From: Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Ragged latency log data in multi-threaded pgbench
Date: 2010-03-16 03:09:14
Message-ID: 20100316120914.9C28.52131E4D@oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> wrote:

> > > 2. Use per-thread log files.
> > > File names would be "pgbench_log.<main-process-id>.<thread-id>".

Here is a patch to implement per-thread log files for pgbench -l.

The log filenames are "pgbench_log.<main-process-id>.<thread-serial-number>"
for each thread, but the first thread (including single-threaded) still uses
"pgbench_log.<main-process-id>" for the name because of compatibility.

Example:
$ pgbench -c16 -j4 -l
$ ls
pgbench_log.2196 pgbench_log.2196.1 pgbench_log.2196.2 pgbench_log.2196.3

Comments and suggenstions welcome.

Regards,
---
Takahiro Itagaki
NTT Open Source Software Center

Attachment Content-Type Size
pgbench_log_20100316.patch application/octet-stream 8.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Domenico Rotiroti 2010-03-16 08:37:42 [RFC] Comments on PostPic project - Repost
Previous Message Takahiro Itagaki 2010-03-16 02:13:37 Re: Ragged latency log data in multi-threaded pgbench