Thu Jul 10 04:32:59 PDT 2008
- Previous message: [Slony1-patches] A possible bug in Slony test_slony_state-dbi.pl
- Next message: [Slony1-patches] Re: A possible bug in Slony test_slony_state-dbi.pl
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Forgot the fix to the dsn string. I am not sure if we should be replacing the spaces in the dsn string with a semicolon, so I'll leave that decision upto the hackers. *** test_slony_state-dbi.pl 2008-07-10 11:13:48.000000000 +0000 --- test_slony_state-dbi.pl.my 2008-07-10 11:32:26.000000000 +0000 *************** *** 73,80 **** --- 73,84 ---- sub test_node { my ($node, $dsn) =3D @_; + $dsn =3D "dbi:Pg:$dsn"; + print "\nTests for node $node - DSN =3D $dsn\n=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D\n"; + $dbh =3D DBI->connect($dsn) or die "Unable to connect: $DBI::errstr\n"; + my $listener_query =3D "select relpages, reltuples from pg_catalog.pg_class where relname =3D 'pg_listener';"; my $res =3D $dbh->prepare($listener_query); $res->execute(); On Thu, Jul 10, 2008 at 7:14 AM, Gurjeet Singh <singh.gurjeet at gmail.com> wrote: > Hi All, > > I am no expert in either Slony or Perl, but it seems to me that the > perl script should be connecting to each node in turn and then executing = the > test_node script; but it is not. The script performs only one connection > throughout it's lifetime, and that is to the $initialDSN. The docs at > http://www.slony.info/documentation/monitoring.html say: > > <snip> > The script then rummages through sl_path to find all of the nodes in the > cluster, and the DSNs to allow it to, in turn, connect to each of them. > </snip> > > Is it possible that I am using an old version of the scripts? I took the > script from: > > > http://main.slony.info/viewcvs/viewvc.cgi/slony1-engine/tools/test_slony_= state-dbi.pl?revision=3D1.5&content-type=3Dtext%2Fplain > > and the $Id $ tag says: > > # $Id: test_slony_state-dbi.pl,v 1.5 2007/01/02 19:34:11 cbbrowne Exp $ > > > Here's a patch to fix the test_node function, if you consider this to > be a bug: > > <patch> > > *** test_slony_state-dbi.pl 2008-07-08 21:43:37.000000000 +0000 > --- test_slony_state-dbi.pl.my 2008-07-10 11:05:09.000000000 +0000 > *************** > *** 75,80 **** > --- 75,82 ---- > > print "\nTests for node $node - DSN =3D > $dsn\n=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D\n"; > > + $dbh =3D DBI->connect($dsn) or die "Unable to connect: $DBI::errstr\n= "; > + > my $listener_query =3D "select relpages, reltuples from > pg_catalog.pg_class where relname =3D 'pg_listener';"; > my $res =3D $dbh->prepare($listener_query); > $res->execute(); > > </patch> > > Best regards, > > -- > gurjeet[.singh]@EnterpriseDB.com > singh.gurjeet@{ gmail | hotmail | indiatimes | yahoo }.com > > EnterpriseDB http://www.enterprisedb.com > > Mail sent from my BlackLaptop device -- = gurjeet[.singh]@EnterpriseDB.com singh.gurjeet@{ gmail | hotmail | indiatimes | yahoo }.com EnterpriseDB http://www.enterprisedb.com Mail sent from my BlackLaptop device -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.slony.info/pipermail/slony1-patches/attachments/20080710/= 29fec7a9/attachment.htm
- Previous message: [Slony1-patches] A possible bug in Slony test_slony_state-dbi.pl
- Next message: [Slony1-patches] Re: A possible bug in Slony test_slony_state-dbi.pl
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-patches mailing list