mirror of
				https://github.com/postgres/postgres.git
				synced 2025-10-31 00:03:57 -04:00 
			
		
		
		
	This simple patch fixes broken Makefile, broken ApplySnapshot and
makes all utilities honour --verbose command line option. -- Yours, Alexey V. Borzov, Webmaster of RDW.ru
This commit is contained in:
		
							parent
							
								
									c666d6fd41
								
							
						
					
					
						commit
						0df1dc6aaf
					
				| @ -32,11 +32,13 @@ $sinfo = "$sinfo host=$opt_host" if (defined($opt_host)); | |||||||
| $sinfo = "$sinfo user=$opt_user" if (defined($opt_user)); | $sinfo = "$sinfo user=$opt_user" if (defined($opt_user)); | ||||||
| $sinfo = "$sinfo password=$opt_password" if (defined($opt_password)); | $sinfo = "$sinfo password=$opt_password" if (defined($opt_password)); | ||||||
| 
 | 
 | ||||||
| my $conn = Pg::connectdb(sinfo); | my $conn = Pg::connectdb($sinfo); | ||||||
| 
 | 
 | ||||||
| my $inpf = new IO::File; | my $inpf = new IO::File; | ||||||
| $inpf = STDIN; | $inpf = STDIN; | ||||||
| 
 | 
 | ||||||
|  | $RServ::quiet = !$verbose; | ||||||
|  | 
 | ||||||
| $res = ApplySnapshot ($conn, $inpf); | $res = ApplySnapshot ($conn, $inpf); | ||||||
| 
 | 
 | ||||||
| if ($res > 0) | if ($res > 0) | ||||||
|  | |||||||
| @ -38,6 +38,8 @@ print "Slave connection is $sinfo\n" if ($debug); | |||||||
| 
 | 
 | ||||||
| my $conn = Pg::connectdb($minfo); | my $conn = Pg::connectdb($minfo); | ||||||
| 
 | 
 | ||||||
|  | $RServ::quiet = !$verbose; | ||||||
|  | 
 | ||||||
| $res = CleanLog($conn, $howold); | $res = CleanLog($conn, $howold); | ||||||
| 
 | 
 | ||||||
| exit(1) if $res < 0; | exit(1) if $res < 0; | ||||||
|  | |||||||
| @ -37,6 +37,8 @@ $sinfo = "$sinfo password=$opt_password" if (defined($opt_password)); | |||||||
| print("Connecting to '$sinfo'\n") if ($debug || $verbose); | print("Connecting to '$sinfo'\n") if ($debug || $verbose); | ||||||
| my $conn = Pg::connectdb($sinfo); | my $conn = Pg::connectdb($sinfo); | ||||||
| 
 | 
 | ||||||
|  | $RServ::quiet = !$verbose; | ||||||
|  | 
 | ||||||
| $res = GetSyncID($conn); | $res = GetSyncID($conn); | ||||||
| 
 | 
 | ||||||
| die "ERROR\n" if $res < 0; | die "ERROR\n" if $res < 0; | ||||||
|  | |||||||
| @ -22,10 +22,10 @@ override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS) | |||||||
| all: $(SQLS) $(TCLS) $(PERLS) $(SCRIPTS) $(SONAME) | all: $(SQLS) $(TCLS) $(PERLS) $(SCRIPTS) $(SONAME) | ||||||
| 
 | 
 | ||||||
| %.sql: %.sql.in | %.sql: %.sql.in | ||||||
| 	sed 's,@MODULE_FILENAME@,$$libdir/$(NAME),g' $< >$@ | 	sed 's,@MODULE_FILENAME@,$(pkglibdir)/$(SONAME),g' $< >$@ | ||||||
| 
 | 
 | ||||||
| $(PERLS) $(TCLS) $(SCRIPTS): %: %.in | $(PERLS) $(TCLS) $(SCRIPTS): %: %.in | ||||||
| 	sed -e 's,@MODULE_FILENAME@,$$libdir/$(NAME),g' \
 | 	sed -e 's,@MODULE_FILENAME@,$(pkglibdir)/$(SONAME),g' \
 | ||||||
| 	    -e 's:@SQLDIR@:$(datadir)/contrib:g' \
 | 	    -e 's:@SQLDIR@:$(datadir)/contrib:g' \
 | ||||||
| 	    -e 's:@BINDIR@:$(bindir):g' \
 | 	    -e 's:@BINDIR@:$(bindir):g' \
 | ||||||
| 	    -e 's:@LIBDIR@:$(datadir)/contrib:g' $< >$@ | 	    -e 's:@LIBDIR@:$(datadir)/contrib:g' $< >$@ | ||||||
|  | |||||||
| @ -36,6 +36,8 @@ $minfo = "$minfo password=$opt_password" if (defined($opt_password)); | |||||||
| 
 | 
 | ||||||
| my $conn = Pg::connectdb($minfo); | my $conn = Pg::connectdb($minfo); | ||||||
| 
 | 
 | ||||||
|  | $RServ::quiet = !$verbose; | ||||||
|  | 
 | ||||||
| $res = SyncSyncID($conn, $server, $syncid); | $res = SyncSyncID($conn, $server, $syncid); | ||||||
| 
 | 
 | ||||||
| if ($res == 0) | if ($res == 0) | ||||||
|  | |||||||
| @ -39,6 +39,8 @@ my $conn = Pg::connectdb($minfo); | |||||||
| my $outf = new IO::File; | my $outf = new IO::File; | ||||||
| $outf = STDOUT; | $outf = STDOUT; | ||||||
| 
 | 
 | ||||||
|  | $RServ::quiet = !$verbose; | ||||||
|  | 
 | ||||||
| $res = PrepareSnapshot ($conn, $outf, $server); | $res = PrepareSnapshot ($conn, $outf, $server); | ||||||
| 
 | 
 | ||||||
| if ($res == 0) | if ($res == 0) | ||||||
|  | |||||||
| @ -49,6 +49,8 @@ print "Slave connection is $sinfo\n" if ($debug); | |||||||
| my $mconn = Pg::connectdb($minfo); | my $mconn = Pg::connectdb($minfo); | ||||||
| my $sconn = Pg::connectdb($sinfo); | my $sconn = Pg::connectdb($sinfo); | ||||||
| 
 | 
 | ||||||
|  | $RServ::quiet = !$verbose; | ||||||
|  | 
 | ||||||
| SyncSync($mconn, $sconn); | SyncSync($mconn, $sconn); | ||||||
| 
 | 
 | ||||||
| my $outf = new IO::File; | my $outf = new IO::File; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user