Re: [Sqlrelay-discussion] pgpool - II
Brought to you by:
mused
|
From: Kalyan R. <kal...@gm...> - 2008-07-16 15:17:34
|
Hi,
I am trying to exec "query" command in sqlrelay.
For that I used this simple program to test to see if it works.
#include <stdio.h>
int main(){
char * args[] = {" -id"," as8","select count(*) from schools","
-config sqlrelay.conf",(char *) 0 };
execvp("/usr/local/sqlrelay/bin/query",args);
}
where as8 is the sqlrelay instance id and schools is one of the
tables in my db.
However, when I run it it generates an error:
postgres@NTH-DNB2:~/sqlrelay$ gcc exec.c
postgres@NTH-DNB2:~/sqlrelay$ ./a.out
usage: query host port socket user password query [debug]
or query [-config configfile] -id id query [debug]
I also tested by varying the parameters in different ways but still
couldn't get it running.
sqlrelay.conf is located in the current directory.
Please help me in this, as I need to run many such instances to do testing.
Thanks,
Kalyan.
On 7/11/08, Kalyan Raghu <kal...@gm...> wrote:
> Hi Frank,
> thanks for your reply.
> As you said, I am working in the second way, client <--> sqlrelay <-->
> pgpool <--> postgresql DB.
>
> It was only a small problem in the configuration of sqlrelay because of
> which I couldn't connect to the pgpool.
> Now, everything is working fine.
>
> Thanks,
> Kalyan.
>
> On Thu, Jul 10, 2008 at 6:23 PM, Frank Joerdens <fr...@jo...> wrote:
>
>> On 7/10/08, Kalyan Raghu <kal...@gm...> wrote:
>> > Hi all,
>> > Is SQLRelay compatible with pgpool - II ?
>> >
>> > When I run a "normal" instance which connects to pgpool - II, it is
>> > working fine. I am able to send queries to pgpool - II via this
>> > instance.
>> >
>> > When I run a query router instance, which connects to this normal
>> > instance, I am not able to send the queries to pgpool - II.
>>
>> I may have been trying something very similar with pgbouncer (a more
>> lightweight pgpool competitor) just now. What is your setup like? If
>> it is sth like
>>
>> client <-> pgpool <-> sqlrelay <-> pg
>>
>> then we are maybe facing the same problem, which is to talk to
>> sqlrelay somehow from a client that is set up to talk to postgres
>> directly. For which there is a compatibility driver:
>>
>> http://sqlrelay.sourceforge.net/sqlrelay/dropin/postgresql.html
>>
>> but it doesn't work for me from either Python via psycopg2 or trying
>> to let pgbouncer talk to sqlrelay via this SQL Relay drop-in
>> replacement library for PostgreSQL ...
>>
>> But it sounds more like you are trying someting like
>>
>> client <-> sqlrelay <-> pgpool <-> pg
>>
>> I think my problem is that it may be difficult for us to quickly
>> replace the psycopg2 driver with the native SQL Relay python driver.
>> Hence trying with the compatibility layer. I am curious about how you
>> are doing it?!
>>
>> Cheers,
>>
>> Frank
>>
>> -------------------------------------------------------------------------
>> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
>> Studies have shown that voting for your favorite open source project,
>> along with a healthy diet, reduces your potential for chronic lameness
>> and boredom. Vote Now at http://www.sourceforge.net/community/cca08
>> _______________________________________________
>> Sqlrelay-discussion mailing list
>> Sql...@li...
>> https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion
>>
>
|