X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 4AF3111F6B47 for ; Wed, 5 Apr 2006 18:45:35 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 36007-04-2 for ; Wed, 5 Apr 2006 18:45:34 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from astro.systems.pipex.net (astro.systems.pipex.net [62.241.163.6]) by postgresql.org (Postfix) with ESMTP id 8307E11F66F3 for ; Wed, 5 Apr 2006 18:26:54 -0300 (ADT) Received: from flange.edesix.com (81-86-64-236.dsl.pipex.com [81.86.64.236]) by astro.systems.pipex.net (Postfix) with ESMTP id 8C19CE0002DF for ; Wed, 5 Apr 2006 22:26:41 +0100 (BST) Received: from host86-131-245-51.range86-131.btcentralplus.com ([86.131.245.51] helo=[192.168.101.208]) by flange.edesix.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.50) id 1FRFWR-0003lS-Mm for pgsql-admin@postgresql.org; Wed, 05 Apr 2006 22:26:39 +0100 Message-ID: <44343613.1050304@edesix.com> Date: Wed, 05 Apr 2006 22:26:43 +0100 From: Robin Iddon User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Re: PITR Based replication ... References: <4433AB17.7060705@edesix.com> <37d451f70604051126s2bd2b322m1ebf76051bdcf02d@mail.gmail.com> In-Reply-To: <37d451f70604051126s2bd2b322m1ebf76051bdcf02d@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.124 required=5 tests=[AWL=0.124] X-Spam-Score: 0.124 X-Spam-Level: X-Archive-Number: 200604/60 X-Sequence-Number: 21229 > Anyone have any suggestions on novel phrases to offer in my incantations for > getting this script to do everything I need? You need to add "-l $LOGFILE" where log is wherever you want to write the stderr+stdout from the postmaster to. Then it will return once starting the server. > Also, is there any way, in the case of shutting down the > production instance for the second pass, to have the shutdown command wait > indefinitely? "-m smart" will give up after waiting so long, and I'd like > neither to interrupt any running jobs, nor end up not taking a backup in the > event a running job outlasts pg_ctl's timeout. > > Not that I know of, but you can poll the server status using the same pg_ctl command constructs as you're using already but with "status" instead of "stop" or "start". pg_ctl (and hence ssh) will return 0 if the server is running and 1 if the server is no running. So you could try something like while ssh $REMOTE pg_ctl -D $CLUSTER status do echo "Remote server still running - continuing to wait ..." sleep 10 done Hope this helps, Robin