Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 674CF2E0032 for ; Mon, 12 May 2008 19:12:32 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 52863-09 for ; Mon, 12 May 2008 19:12:25 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outmail128076.authsmtp.com (outmail128076.authsmtp.com [62.13.128.76]) by developer.postgresql.org (Postfix) with ESMTP id 8DDC62E0031 for ; Mon, 12 May 2008 19:12:28 -0300 (ADT) Received: from mail-c187.authsmtp.com (mail-c187.authsmtp.com [62.13.128.33]) by punt4.authsmtp.com (8.14.1/8.14.1/Kp) with ESMTP id m4CMCO5f042525; Mon, 12 May 2008 23:12:24 +0100 (BST) Received: from [192.168.0.3] (85-211-221-107.dyn.gotadsl.co.uk [85.211.221.107]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id m4CMCN4R093280; Mon, 12 May 2008 23:12:23 +0100 (BST) Subject: Re: odd output in restore mode From: Simon Riggs To: Andrew Dunstan Cc: PostgreSQL-development In-Reply-To: <4828AF1D.7060405@dunslane.net> References: <4828AF1D.7060405@dunslane.net> Content-Type: text/plain Date: Mon, 12 May 2008 23:14:00 +0100 Message-Id: <1210630440.29684.249.camel@ebony.site> Mime-Version: 1.0 X-Mailer: Evolution 2.8.2 Content-Transfer-Encoding: 7bit X-Server-Quench: 7fc5313e-2070-11dd-941c-001185d377ca X-AuthRoute: OCdxZQATClZOTQEd DAteCiNZVAwpPBRK HVkIKg5MJUcNSQVJ NksadBtFaQdbYFhI HGQLW1xEUl57WGF/ aQ4fZQBDYEtPQQdo UVZIQlVNFgB3AVJc Am1jIWd2FQVPe3x4 ZQhmWXBaEkMsJkN+ Q00BCG8GYmd9aWFL BF1RcwIHbQNKfx5N bwR8U3ReMCtlM3Bw GAM/dzcsIS1CNGxU REkXIEkORlwGVjs7 Sx1q X-Authentic-SMTP: 61633235383639.squirrel.dmpriest.net.uk:953/Kp X-Report-SPAM: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200805/386 X-Sequence-Number: 118385 On Mon, 2008-05-12 at 16:57 -0400, Andrew Dunstan wrote: > I have just been working on setting up a continuous recovery failover > system, and noticed some odd log lines, shown below. (Using 8.3). Hmmm, well, the first time you use something complex, there are some surprising features, I guess. Most especially the log lines are there to allow production issues to be diagnosed, not to create a beautiful log. Many of the things that look somewhat strange are there for a reason, since a wide range of options and save-your-customers-ass scenarios are covered by the recovery code. Suggestions for improvement are always welcome and you are welcome to suggest doc changes, as many people do. > First note that our parsing of recovery.conf in xlog.c is pretty bad, > and at least we need to document the quirks if it's not going to be > fixed. log_restartpoints is said to be boolean, but when I set it to an > unquoted true I got a fatal error, while a quoted 'on' sets it to false, > as seen. Ick. Yes, some improvements are definitely due there. > What is more, I apparently managed to get the recovery > server to lose a WAL file and hang totally by having a bad > recovery.conf. Triple ick. Sounds like a bug you should report in the normal way. Correctness is paramount. Or are you confusing the message in the log for file AA with an error? > Second, what is all this about .history files? My understanding is that > they are not necessary, so surely we should try to stat them to see if > they are present before trying to copy them. These lines are going to > confuse a lot of people, I suspect (including me). I try to keep it as simple as possible, since much of this code only gets run when you really need it to work. The request for the .history file and the cp are examples of that. > Lastly, not quite related to this output, but in the same general area, > should we have an option on pg_standby to allow removing the archive > file after it has been restored? There already is one, but its more complex than that. (%r) > LOG: database system was interrupted; last known up at 2008-05-12 > 15:18:23 EDT > LOG: starting archive recovery > LOG: log_restartpoints = false > LOG: restore_command = '../bin/pg_standby -t ../common_archive/failover > ../common_archive %f %p %r ' > cp: cannot stat `../common_archive/00000001.history': No such file or > directory > cp: cannot stat `../common_archive/00000001.history': No such file or > directory > cp: cannot stat `../common_archive/00000001.history': No such file or > directory > LOG: restored log file "0000000100000000000000A5.00000068.backup" from > archive > LOG: restored log file "0000000100000000000000A5" from archive > LOG: automatic recovery in progress > LOG: redo starts at 0/A50000B0 > LOG: restored log file "0000000100000000000000A6" from archive > LOG: restored log file "0000000100000000000000A7" from archive > LOG: restored log file "0000000100000000000000A8" from archive > LOG: restored log file "0000000100000000000000A9" from archive > trigger file found > LOG: could not open file "pg_xlog/0000000100000000000000AA" (log file > 0, segment 170): No such file or directory > LOG: redo done at 0/A9000068 > LOG: restored log file "0000000100000000000000A9" from archive > cp: cannot stat `../common_archive/00000002.history': No such file or > directory > cp: cannot stat `../common_archive/00000002.history': No such file or > directory > cp: cannot stat `../common_archive/00000002.history': No such file or > directory > LOG: selected new timeline ID: 2 > cp: cannot stat `../common_archive/00000001.history': No such file or > directory > cp: cannot stat `../common_archive/00000001.history': No such file or > directory > cp: cannot stat `../common_archive/00000001.history': No such file or > directory > LOG: archive recovery complete > LOG: database system is ready to accept connections > LOG: autovacuum launcher started There is an outstanding Windows issue with pg_standby that your help would be appreciated with, shown on latest commitfest page. It's a Windows issue and I don't maintain a Windows dev environment. -- Simon Riggs 2ndQuadrant http://www.2ndQuadrant.com