From: rudi <rudolone@gmail.com>
To: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: Streaming replication: rsync to switchover
Date: Tue, 19 Apr 2011 17:29:32 +0200
Message-ID: <4DADAA5C.6040107@gmail.com> (raw)
In-Reply-To: <20110419121105.GA17761@cns.vt.edu>
References: <4DAC7205.8080203@kemen.it>
<BANLkTikrqROJjNiVpmkZorkPM7nUYHZUAw@mail.gmail.com>
<4DAD52D8.1090006@gmail.com>
<20110419121105.GA17761@cns.vt.edu>
On 04/19/2011 02:11 PM, Ray Stell wrote:
> On Tue, Apr 19, 2011 at 11:16:08AM +0200, rudi wrote:
>> On 04/19/2011 10:09 AM, Gerhard Hintermayer wrote:
>> So you keep the old pg_xlog
>
> the admin book says to exclude old pg_xlog
>
Which book is this?
So I guess something like this (from new master to former master) should
be safe:
$ 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()"
What about the archiving directory of the former slave (now master)?
It should be cleaned guess, in case it will be slave again. If I look at
that directory, after a failover it is not empty.
This looks strange to me because pg_cleanup_archive should have already
cleaned it.
BTW, is there any documentation about the logic behind pg_xlog
filenames? It is really obscure and this makes really hard understanding
what's going on. I'm sure that most recent mtime gives me the active
WAL, and I can match somehow this:
Latest checkpoint location: 7/F70021A0
Prior checkpoint location: 7/F7002110
Latest checkpoint's REDO location: 7/F7002168
Latest checkpoint's TimeLineID: 2
with this filename: 0000000200000007000000F7
and that's all.
thanks,
--
rd
Peel your own image from the mirror.
Sit. Feast on your life.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: rudolone@gmail.com
Subject: Re: Streaming replication: rsync to switchover
In-Reply-To: <4DADAA5C.6040107@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox