diff --git a/contrib/rserv/GetSyncID.in b/contrib/rserv/GetSyncID.in index 2ffe7d3c54..d5b0755a2e 100644 --- a/contrib/rserv/GetSyncID.in +++ b/contrib/rserv/GetSyncID.in @@ -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); diff --git a/contrib/rserv/Makefile b/contrib/rserv/Makefile index 8d933f006e..1e161551d9 100644 --- a/contrib/rserv/Makefile +++ b/contrib/rserv/Makefile @@ -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)) diff --git a/contrib/rserv/SyncSyncID.in b/contrib/rserv/MasterSync.in similarity index 98% rename from contrib/rserv/SyncSyncID.in rename to contrib/rserv/MasterSync.in index a5ab88bc53..abbe69ee0b 100644 --- a/contrib/rserv/SyncSyncID.in +++ b/contrib/rserv/MasterSync.in @@ -1,5 +1,5 @@ # -*- perl -*- -# SyncSyncID +# MasterSync # Vadim Mikheev, (c) 2000, PostgreSQL Inc. eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' diff --git a/contrib/rserv/README.rserv b/contrib/rserv/README.rserv index 5ccd87b345..1a61fefd2d 100644 --- a/contrib/rserv/README.rserv +++ b/contrib/rserv/README.rserv @@ -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 diff --git a/contrib/rserv/SlaveInit.in b/contrib/rserv/SlaveInit.in index 753d4dddb5..bbe152fe8e 100644 --- a/contrib/rserv/SlaveInit.in +++ b/contrib/rserv/SlaveInit.in @@ -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";