Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 8B8081337BA3 for ; Wed, 20 Apr 2011 05:58:00 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 39170-06 for ; Wed, 20 Apr 2011 08:57:54 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mail.postgresql.org (Postfix) with ESMTP id 7A2C61337B9C for ; Wed, 20 Apr 2011 05:57:52 -0300 (ADT) Received: by wwc33 with SMTP id 33so505565wwc.19 for ; Wed, 20 Apr 2011 01:57:51 -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=p4Hf1cUsxOPp6vIFzz9yQSF08RmdIJJQVO0fVipLHg8=; b=KhLEx/7JdxFnlkiShdyOIIoFwyIZWRQhR5Zact4x6rcBqpzkIQpzY/DuSvzJmPo7O8 1wpL5Qs2jJ2CKgXzDGPqGQNW2vGywbP/TOLV/IDjZY+2a9HVDDAY12LFgdfiVWLL7tVg tRGSuVZq2oyoz9wMRhI4/4zGgpJlkLvEN1X2w= 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=B8mCYRly1sFUaVQdO7bnMzLgXQVqaO0NmYKZdB+v/4nJvrbTLCLSwbJUCeQZFl2B0y 1qo+s5IMomNUhrp2pkwCZLzsIxGYXvQWzlZ3ghe7YYn90mYhqf5nA12Bz+XHGWMWivPj oZyJG4Ebt0L0Rrs0FfpB2VtsworjTNmcM16eg= Received: by 10.216.202.147 with SMTP id d19mr5065800weo.23.1303289871682; Wed, 20 Apr 2011 01:57:51 -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 d6sm330209wer.26.2011.04.20.01.57.50 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 20 Apr 2011 01:57:50 -0700 (PDT) Message-ID: <4DAEA00C.2040807@gmail.com> Date: Wed, 20 Apr 2011 10:57:48 +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> <4DAE98A3.3090002@gmail.com> In-Reply-To: <4DAE98A3.3090002@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/182 X-Sequence-Number: 37363 On 04/20/2011 10:26 AM, rudi wrote: > 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. My fault: it seems I forgot to stop the backup in my previous attempt. I tried this procedure and now the former master acts as a hot standby as expected: On the former master: a) stop b) cleanup pg_xlog c) set archive_mode = off and hot_standby = on in postgresql.conf On the former slave: a) set archive_mode = on in postgresql.conf b) psql -c "SELECT pg_start_backup('switchover base backup')" c) rsync -av $PGDATA --delete --exclude server.crt --exclude server.key --exclude recovery.* --exclude postmaster.pid --exclude pg_xlog --exclude archive $SLAVE:$PGDATA d) psql -c "SELECT pg_stop_backup()" Finally I started the former master. -- rd Peel your own image from the mirror. Sit. Feast on your life.