Re: [PATCH] pgbench: new feature allowing to launch shell commands

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] pgbench: new feature allowing to launch shell commands
Date: 2009-08-07 03:26:45
Message-ID: c64c5f8b0908062026p6cd6b710wf1b2b359eb78ff6f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Sorry I forgot to attach the the patch.

Regards,

Michael

On Fri, Aug 7, 2009 at 12:23 PM, Michael Paquier
<michael(dot)paquier(at)gmail(dot)com>wrote:

> Hi all,
>
> Here is a short patch implementing a new feature in pgbench so as to allow
> shell commands to be launched in a transaction file of pgbench.
> the user has just to add at the beginning of the command line in his
> transaction file \shell + the command wanted.
>
> As an example of transaction:
> Begin;
> [Transaction instructions]
> Prepare transaction ‘TXID’;
> \shell ls ~/pg_twophase;
> Commit prepared ‘TXID’;
>
> This patch was particularly useful in order to determine the size of state
> files flushed to disk for prepared but not committed transactions.
> As an addition, I added a new default transaction in the code that permits
> to launch a 2PC transaction with a random prepare identifier of the format
> Txxx.
>
> I also created a page in postgresql's wiki about this feature.
> Please refer to this link:
> http://wiki.postgresql.org/wiki/Pgbench:_shell_command
>
> Regards,
>
> --
> Michael Paquier
>
> NTT OSSC
>

--
Michael Paquier

NTT OSSC

Attachment Content-Type Size
postgresql-8.4.0-pgbenchshell.patch application/octet-stream 4.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2009-08-07 03:31:12 [PATCH] 2PC state files on shared memory
Previous Message Michael Paquier 2009-08-07 03:23:38 [PATCH] pgbench: new feature allowing to launch shell commands