Brian A. Seklecki lavalamp
Mon Jan 23 08:59:31 PST 2006
Regarding this script on FreeBSD:

1) It doesn't get installed with all of the other Perl scripts in 
tools/altperl/ even with --with-perltools set

2) Dependency Ports are:

  - p5-DBD-Pg-1.43_1 Provides access to PostgreSQL databases through the
    DBI

  - p5-DBI-1.50 The perl5 Database Interface.  Required for DBD::* modules

  - p5-Pg-2.1.1_2,1 An interface for using perl5 to access PostgreSQL
    databases

  - p5-Storable-2.15    Persistency for perl data structures

3) The DSN call doesn't pass the $user attribute by default and the SQL 
query doesn't seem to properly concatenate variables:

# diff -u /root/slony_test_state.pl 
/usr/ports/databases/slony1/work/slony1-1.1.2/tools/test_slony_state.pl
--- /root/slony_test_state.pl   Mon Jan 23 11:38:34 2006
+++ 
/usr/ports/databases/slony1/work/slony1-1.1.2/tools/test_slony_state.pl 
Tue Mar 15 11:42:58 2005
@@ -33,22 +33,20 @@
  $mailprog = $opt_mailprog if (defined($opt_mailprog));

  #DBI: my $initialDSN = "dbi:Pg:dbname=$database;host=$host;port=$port";
-my $initialDSN = "dbname=$database host=$host port=$port user=$user";
+my $initialDSN = "dbname=$database host=$host port=$port";
  $initialDSN = $initialDSN . " password=$password" if 
defined($opt_password);

  print "DSN: $initialDSN\n===========================\n";

  my $dbh = Pg::connectdb($initialDSN);

-print "DEBUG: Cluster: $cluster\n";
-print "DEBUG: User: $user\n";
  print "Rummage for DSNs\n=============================\n";
  # Query to find live DSNs
  my $dsnsquery =
  "
     select p.pa_server, p.pa_conninfo
-   from _" . $cluster . ".sl_path p
-   where exists (select * from _" . $cluster . ".sl_subscribe s where
+   from "_$cluster".sl_path p
+   where exists (select * from "_$cluster".sl_subscribe s where
                            (s.sub_provider = p.pa_server or s.sub_receiver 
= p.pa_server) and
                            sub_active = 't')
     group by pa_server, pa_conninfo;

I'll submit a send-pr(1) for the FreeBSD port when I have free moment.


~BAS



On Thu, 19 Jan 2006, Christopher Browne wrote:

> Aaron Randall <aaron.randall at visionoss.com> writes:
>> Where can I get "test_slony_state.pl" from?
>
> Take a look in the "tools" directory where you have the Slony-I
> sources...  It's in there...
> -- 
> (format nil "~S@~S" "cbbrowne" "ca.afilias.info")
> <http://dba2.int.libertyrms.com/>
> Christopher Browne
> (416) 673-4124 (land)
> _______________________________________________
> Slony1-general mailing list
> Slony1-general at gborg.postgresql.org
> http://gborg.postgresql.org/mailman/listinfo/slony1-general
>

l8*
 	-lava

x.25 - minix - bitnet - plan9 - 110 bps - ASR 33 - base8



More information about the Slony1-general mailing list