Skip site navigation (1) Skip section navigation (2)

Re: Streaming replication: rsync to switchover

From: rudi <rudolone(at)gmail(dot)com>
To: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Streaming replication: rsync to switchover
Date: 2011-04-20 08:57:48
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
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(at)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 

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 --exclude pg_xlog 
--exclude archive $SLAVE:$PGDATA
d) psql -c "SELECT pg_stop_backup()"

Finally I started the former master.


Peel your own image from the mirror.
Sit. Feast on your life.

In response to

pgsql-admin by date

Next:From: Lukasz BrodziakDate: 2011-04-20 10:46:58
Subject: Dropping foreign key only if it exists
Previous:From: rudiDate: 2011-04-20 08:26:11
Subject: Re: Streaming replication: rsync to switchover

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group