On Tue, Aug 21, 2012 at 6:04 PM, Tatsuo Ishii <is...@postgresql.org> wrote:
> Hi, > > I am thinking about to implement "multi-master" option for pgbench. > Supose we have multiple PostgreSQL running on host1 and host2. > Something like "pgbench -c 10 -h host1,host2..." will create 5 > connections to host1 and host2 and send queries to host1 and host2. > The point of this functionality is to test some cluster software which > have a capability to create multi-master configuration. > Perhaps the read option has a good interest for PostgreSQL to check a simultaneous load on a multiple cluster of Postgres with read operations. But I do not see any immediate use of write operations only. Have you thought about the possibility to define a different set of transaction depending on the node targetted? For example you could target a master with write-read and slaves with read-only. Btw, this could have some use not only for Postgres, but also for other projects based on it with which you could really do some multi-master benchmark in writing. Do you have some thoughts about the possible option specifications? Configuration files would be too heavy for the only purpose of pgbench. So, specifiying all the info in a single command? It is of course possible, but command will become easily unreadable, and it might be the cause of many mistakes. However, here are some ideas you might use: 1) pgbench -h host1:port1,host2:port2 ... 2) pgbench -h host1,host2 -p port1:port2 Regards, -- Michael Paquier http://michael.otacoo.com