提交 e59e805d 编写于 作者: T Thomas G. Lockhart

Rename undocumented utility SyncSyncID to MasterSync.

Document MasterSync.
Fix up a couple of print statements to respect $verbose and $debug.
上级 e6e9e18e
......@@ -34,7 +34,7 @@ $sinfo = "$sinfo host=$opt_host" if (defined($opt_host));
$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);
......
......@@ -13,8 +13,9 @@ OBJS = $(NAME).o
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+"$@"}'
......
......@@ -48,7 +48,12 @@ Replicate masterdb slavedb
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
......
......@@ -38,7 +38,7 @@ sub RollbackAndQuit {
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";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册