Re: Some minor changes to pgbench - Mailing list pgsql-hackers

From ITAGAKI Takahiro
Subject Re: Some minor changes to pgbench
Date
Msg-id 20060824123224.588D.ITAGAKI.TAKAHIRO@oss.ntt.co.jp
Whole thread Raw
In response to Re: [PATCHES] Some minor changes to pgbench  ("Joshua D. Drake" <jd@commandprompt.com>)
Responses Re: Some minor changes to pgbench
List pgsql-hackers
"Joshua D. Drake" <jd@commandprompt.com> wrote:

> >> Would it be worthwhile to add a switch so that the foreign key test is
> >> only used "if" they use the switch in conjunction with a -i?
> >
> > I wouldn't object to providing that as a (non default) option.
>
> O.k. I will take a look at what that would take..

If we provide 'external initializer', some of your proposals can be done
through more generalized way, at least the foreign key test. It is a
replacement of the DDLAFTERs[], which is a hard-codeded list in the source
code to create primary keys. It may help other people, for example, who want
to test the performance of hash index instead of btree index (primary key).


Using it, you can use the below script or something:

$ pgbench -i -f init_with_fkey.sql
[init_with_fkey.sql]
alter table branches add primary key (bid);
...
alter table tellers add constraint tellers_bid_fkey   foreign key (bid) references branches (bid);
...


Are you interested in this idea?

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




pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: pgsql-patches reply-to (was Re: [PATCHES] selecting large result sets in psql using cursors)
Next
From: Tom Lane
Date:
Subject: Re: Some minor changes to pgbench