Take the hint and shutdown fast.
authorDavid E. Wheeler <david@justatheory.com>
Fri, 19 Oct 2012 01:50:54 +0000 (18:50 -0700)
committerDavid E. Wheeler <david@justatheory.com>
Fri, 19 Oct 2012 01:50:54 +0000 (18:50 -0700)
Fast mode does not wait for clients to disconnect, which is what we want.

t/BucardoTesting.pm

index fbcbed1ac8b397e9251452bce7e67d33c817ffd3..fcb6026abade32146a540a6e463b809388c666d7 100644 (file)
@@ -1279,8 +1279,8 @@ sub shutdown_cluster {
 
     my $pidfile = "$dirname/postmaster.pid";
     return if ! -e $pidfile;
-    system($pg_ctl, '-D', $dirname, '-s', 'stop') == 0
-        or die "$pg_ctl -D $dirname -s stop failed: $?\n";
+    my @cmd = ($pg_ctl, '-D', $dirname, '-s', '-m', 'fast', 'stop');
+    system(@cmd) == 0 or die "@cmd failed: $?\n";
     return;
 
 } ## end of shutdown_cluster