Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 318261337BA3 for ; Wed, 20 Apr 2011 05:26:23 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 96348-01 for ; Wed, 20 Apr 2011 08:26:16 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wy0-f174.google.com (mail-wy0-f174.google.com [74.125.82.174]) by mail.postgresql.org (Postfix) with ESMTP id 94D671337B9C for ; Wed, 20 Apr 2011 05:26:15 -0300 (ADT) Received: by wya21 with SMTP id 21so392199wya.19 for ; Wed, 20 Apr 2011 01:26:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=81GaGtWCNh652MWLAhqdyshJQyPmG2DCWqFFAwhusoc=; b=QycEJHyzQkqrYxpELvB4hFLj2e+7VZ+cqemiJRoQHKubznSnE4sWDgEEoae/Eddu5Z cNDNcWsWydB18drM7Qvpo1bA55sDtI3iqwexGEPXFRRFw6THWWSICKchQ6MtXWBRAHjE suroUk+82DicP76SuCa+LTm26q2Ic4NEcs4ss= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=lcYzlz0gFATVnLDMYtAlGpizzj5vOD6bbmU96yWJCNFEzw5rLO1LB9BuitHCVbV5oy gaUh+cBmwed5tJofDVAU/zacgBFg8H7cO0ba/lJGRIaZfWNlzApqAOrt71YChbl1MdYk dl0CdyOVCdLf7gW1Ve4QuQujcSN5HrrdwiKoQ= Received: by 10.216.120.144 with SMTP id p16mr523882weh.10.1303287974322; Wed, 20 Apr 2011 01:26:14 -0700 (PDT) Received: from [10.10.10.48] (89-96-231-108.ip14.fastwebnet.it [89.96.231.108]) by mx.google.com with ESMTPS id n2sm315775wej.22.2011.04.20.01.26.13 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 20 Apr 2011 01:26:13 -0700 (PDT) Message-ID: <4DAE98A3.3090002@gmail.com> Date: Wed, 20 Apr 2011 10:26:11 +0200 From: rudi User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 MIME-Version: 1.0 To: pgsql-admin Subject: Re: Streaming replication: rsync to switchover References: <4DAC7205.8080203@kemen.it> <4DAD52D8.1090006@gmail.com> <20110419121105.GA17761@cns.vt.edu> <4DADAA5C.6040107@gmail.com> In-Reply-To: <4DADAA5C.6040107@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.421 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, FS_REPLICA=3.599, RFC_ABUSE_POST=0.001, SARE_SPEC_REPLICA=0.72 X-Spam-Level: ** X-Archive-Number: 201104/181 X-Sequence-Number: 37362 On 04/19/2011 05:29 PM, rudi wrote: > $ psql -c "SELECT pg_start_backup('switchover base backup')" > $ rsync -av /var/lib/postgresql/9.0/main/ --delete --exclude server.crt > --exclude server.key --exclude recovery.* --exclude postmaster.pid > --exclude archive $FORMER_MASTER_ADDRESS:/var/lib/postgresql/9.0/main/ > $ psql -c "SELECT pg_stop_backup()" No, it doesn't work. The slave is stuck in "archive recovery": Database cluster state: in archive recovery and doesn't accept connections: 2011-04-20 10:17:00 CEST:[local]:u@postgres:[13099] FATAL: the database system is starting up even if is a hot standby. I really can't find a way to do a safe switchover. -- rd Peel your own image from the mirror. Sit. Feast on your life.