From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-admin@postgresql.org
Subject: Setting up a warm standby server - some questions
Date: Thu, 15 Jul 2010 12:20:23 +0200
Message-ID: <i1mnd7$9gk$1@dough.gmane.org> (raw)
Hi,
I'm trying to setup a warm standby server. But there are some things that I don't yet understand.
I'm testing this on my windows box to understand the concepts and while waiting for the real hardware ;)
I got the basic setup working, and a simulated failover was working, but some things are unclear to me:
What is the recommended way to switch back to the primary, once that is up and running again?
Especially assuming that data has been changed on the secondar?
Can I do a base backup of the data directory (after running pg_start_backup()) from the secondary to the primary?
What is the recommended way to get the secondary back into the "standby" mode?
Currently I simply shut it down, rename recovery.done to recovery.conf and start it up again.
Is this allright?
In the logfile that is written by pg_standby I can see some "errors" and I'm not sure if that's OK.
My recovery.conf looks like this:
restore_command = 'c:\Projects\pgtest\standby\server\bin\pg_standby.exe -l -d -s 2 -k 50 -t c:\Projects\pgtest\standby\pgsql.trigger c:\Projects\pgtest\archive %f %p %r >>c:\Projects\pg\standby\standby.log 2>&1'
Which is essentially copied from the manual and seems to be working.
However in the standby.log I can see messages like this:
Command for restore : copy "c:\Projects\pg\archive\00000003.history" "pg_xlog\RECOVERYHISTORY"
Keep archive history : 000000000000000000000000 and later
running restore :The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
not restored
history file not found
The "cannot find the file" or "history file not found" do not look right to me.
Although I also see "success" messages in there, like:
running restore : 1 file(s) copied.
OK
So what should I do about the error messages?
I have also problems shutting down the secondary server while it is in "standby" (i.e. recovery) mode
If I use "pg_ctl stop" it never shuts down.
If I use "pg_ctl stop -m immediate" most of the postgres processes terminate, but the one that spawned the pg_standby process will linger around.
What am I missing here?
Thanks a lot in advance
Thomas
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: spam_eater@gmx.net
Subject: Re: Setting up a warm standby server - some questions
In-Reply-To: <i1mnd7$9gk$1@dough.gmane.org>
* 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