Takahiro Itagaki <itagaki.takahiro@oss.ntt.co.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