From: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
---|---|
To: | Fujii Masao <fujii(dot)masao(at)oss(dot)ntt(dot)co(dot)jp> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Avoiding a needless failure of PITR |
Date: | 2008-04-24 15:18:53 |
Message-ID: | 1209050333.4259.1566.camel@ebony.site |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, 2008-04-24 at 23:25 +0900, Fujii Masao wrote:
> Hi,
>
> PITR always fails in finding the archived log file with wrong size. But,
> I think that we can continue PITR if .ready file of the same name exists
> in XLOGDIR/archive_status, ie the complete file might exist in XLOGDIR.
>
> I want to modify the implementation of PITR a little as follows.
>
> - In PITR, if the archived log file with wrong size is found,
> we check for .ready in XLOGDIR/archive_status.
>
> - If .ready exists, we try to continue PITR by using the log file in XLOGDIR.
> (The log message about the situation might be needed.)
>
> - Otherwise, we make PITR fail as it is (making fatal error).
If you do get this error *and* you have a good copy of the file
somewhere, then you can copy it to the archive and restart recovery.
If we didn't fail, but checked for a local copy then it would have
worked automatically in your case, thats true. But it would fail in any
other case where a truncated file was copied over even though a good
copy is available, such as when 2 copies of archived files are
maintained remotely.
We should look upon the FATAL error as an opportunity to intervene and
then restart recovery, rather than a problem itself.
--
Simon Riggs
2ndQuadrant http://www.2ndQuadrant.com
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2008-04-24 15:21:28 | Re: Proposed patch - psql wraps at window width |
Previous Message | Alvaro Herrera | 2008-04-24 14:50:26 | Re: Proposed patch - psql wraps at window width |