Re: pgbench: new feature allowing to launch shell commands

From: Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Greg Smith <greg(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pgbench: new feature allowing to launch shell commands
Date: 2009-12-09 06:12:32
Message-ID: 20091209151232.36C3.52131E4D@oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Michael Paquier <michael(dot)paquier(at)gmail(dot)com> wrote:

> Please find attached the latest version of the patch,
> with the threading bug corrected and the documentation updated as well.

Why do you use BUFFER_SIZE-1 for snprintf?
snprintf(commandShell, SHELL_COMMAND_SIZE-1, ...)
Trailing nulls are also included in the length, so
snprintf(commandShell, SHELL_COMMAND_SIZE, ...)
would be ok. (removed -1)

Other parts look fine, except an empty tag <replaceable></> in the
documentation. Is it a typo?

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2009-12-09 06:44:12 Re: Adding support for SE-Linux security
Previous Message Takahiro Itagaki 2009-12-09 05:36:51 Re: EXPLAIN BUFFERS