Document MasterSync.
Fix up a couple of print statements to respect $verbose and $debug.
$sinfo = "$sinfo user=$opt_user" if (defined($opt_user));
$sinfo = "$sinfo password=$opt_password" if (defined($opt_password));
-if ($verbose) { print "Connecting to '$sinfo'\n" };
+print("Connecting to '$sinfo'\n") if ($debug || $verbose);
my $conn = Pg::connectdb($sinfo);
$res = GetSyncID($conn);
DOCS = README.$(NAME)
SQLS = master.sql slave.sql
TCLS = RservTest
-PERLS = MasterInit SlaveInit MasterAddTable SlaveAddTable Replicate CleanLog
-PERLS += PrepareSnapshot ApplySnapshot GetSyncID SyncSyncID
+PERLS = MasterInit MasterAddTable Replicate MasterSync CleanLog
+PERLS += SlaveInit SlaveAddTable GetSyncID
+PERLS += PrepareSnapshot ApplySnapshot
LIBS = RServ.pm
SCRIPTS = InitRservTest
MODS = $(OBJS:.o=$(DLSUFFIX))
# -*- perl -*-
-# SyncSyncID
+# MasterSync
# Vadim Mikheev, (c) 2000, PostgreSQL Inc.
eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
GetSyncID [--noverbose] slavedb
returns the last syncid the specified slave has seen. May be used
- in conjunction with CleanLog using the --noverbose option.
+ in conjunction with SyncSyncID and CleanLog using the --noverbose
+ option.
+
+MasterSync masterdb syncid
+ registers a syncid with the specified master database. Used to
+ propagate replication success back to the master database.
CleanLog masterdb syncid
removes obsolete entries in the master database replication log
exit (-1);
}
-print "Connecting to $sinfo\n";
+print("Connecting to $sinfo\n") if ($debug || $verbose);
my $conn = Pg::connectdb($sinfo);
if ($conn->status != PGRES_CONNECTION_OK) {
print STDERR "Failed opening $sinfo\n";