Re: pgbench post-connection command - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: pgbench post-connection command
Date
Msg-id 4F0F019C.1070701@enterprisedb.com
Whole thread Raw
In response to Re: pgbench post-connection command  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pgbench post-connection command  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 12.01.2012 17:26, Tom Lane wrote:
> Simon Riggs<simon@2ndQuadrant.com>  writes:
>> New -x option for pgbench executes the given command once after
>> connection of each session.

If it's just for SET, you could just put the GUCs in postgresql.conf.

> This seems rather poorly designed, mainly because there's no reason to
> think that a single command would be sufficient.
>
> What would make more sense to me is to add an option for a one-time
> script, or possibly extend the script language to allow marking some
> commands as "do once".

Hmm, that might be handy. I wanted to write a some tests a while ago 
where each session operated on a separate table. With this, I could've 
put the CREATE TABLE statement in the statup-script.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: JSON for PG 9.2
Next
From: Satoshi Nagayasu
Date:
Subject: Re: log messages for archive recovery progress