Home > Archive > Slony1 PostgreSQL Replication > January 2006 > Re: How do I know that the machines are connected









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: How do I know that the machines are connected
Brian A. Seklecki

2006-01-23, 11:25 am


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_mailpr
og));

#DBI: my $initialDSN = " dbi:Pg:dbname=$datab
ase;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_passwor
d);

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

my $dbh = Pg::connectdb($initi
alDSN);

-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- LJ+G6BnwIY2akBO8gow8
eQ@public.gmane.org> writes:
>
> 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- AuKwsB3Fm+ugFIWk8tvy
RWD2FQJk+8+b@public.gmane.org
> http://gborg.postgresql.org/mailman.../slony1-general
>


l8*
-lava

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





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com