Lists: | pgsql-admin |
---|
From: | Paul Gross <pgross(at)gmail(dot)com> |
---|---|
To: | pgsql-admin(at)postgresql(dot)org |
Subject: | Restarting recovery mode with pg_standby after failure |
Date: | 2011-03-21 16:08:35 |
Message-ID: | 3761900d-e6e9-4c57-be35-dfc6e200743d@y31g2000vbp.googlegroups.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-admin |
We are using pg_standby to consume WAL files from another postgres
server. Both servers are running 8.4 on ubuntu lucid. One of the WAL
files had incorrect permissions:
running restore :cp: cannot open `/some/path/
00000001000000E700000081' for reading: Permission denied
It looks like pg_standby hit this error, stopped recovery, and brought
up the database. I can fix the permissions on this one file.
My question is if there is a way to restart recovery mode and have the
database pick up on the WAL file where it left off. When I put the
recovery.conf back, it starts looking for WAL files in timeline 2. If
I manually specify recovery_target_timeline to '00000001', I get an
error about child timelines.
Do I have to re-sync the data files, or can I start recovery again
with the existing WAL files?
Thanks,
Paul Gross
From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
---|---|
To: | Paul Gross <pgross(at)gmail(dot)com> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Restarting recovery mode with pg_standby after failure |
Date: | 2011-03-24 10:05:54 |
Message-ID: | AANLkTinXbRPKV-oTJz6WMyiOEqDxDVuMasSA6XiwwWuA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-admin |
On Tue, Mar 22, 2011 at 1:08 AM, Paul Gross <pgross(at)gmail(dot)com> wrote:
> We are using pg_standby to consume WAL files from another postgres
> server. Both servers are running 8.4 on ubuntu lucid. One of the WAL
> files had incorrect permissions:
>
> running restore :cp: cannot open `/some/path/
> 00000001000000E700000081' for reading: Permission denied
>
> It looks like pg_standby hit this error, stopped recovery, and brought
> up the database. I can fix the permissions on this one file.
>
> My question is if there is a way to restart recovery mode and have the
> database pick up on the WAL file where it left off. When I put the
> recovery.conf back, it starts looking for WAL files in timeline 2. If
> I manually specify recovery_target_timeline to '00000001', I get an
> error about child timelines.
>
> Do I have to re-sync the data files, or can I start recovery again
> with the existing WAL files?
You need to do the former, i.e., take new base backup and start the
standby from that. Otherwise, you cannot rewind the timeline ID.
Regards,
--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center