From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
---|---|
To: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: avoid unnecessary failure to open restored WAL files |
Date: | 2012-08-07 18:08:54 |
Message-ID: | CA+U5nM+VJM_USDq2-CTxazW78PcCnn__5TQp2L=qxZUHbjdpgg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2 August 2012 17:18, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> Hi,
>
> In HEAD and 9.2, the following scenario happens in archive recovery.
>
> 1. The archived WAL file is restored onto the temporary file name
> "RECOVERYXLOG".
> 2. The restored WAL file is renamed to the correct file name like
> 000000010000000000000002.
> 3. The startup process tries to open the temporary file even though
> it's already been renamed
> and doesn't exist. This always fails.
> 4. The startup process retries to open the correct file as a WAL file
> in pg_xlog directory instead
> of the archived file. This succeeds.
>
> The above failure of file open is unnecessary, so I think we can avoid
> that. Attached patch
> changes the startup process so that it opens the correct restored WAL
> file after restoring the
> archived WAL file.
Looks to me that the strncpy is backwards and will still fail. Please
double check.
--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2012-08-07 18:14:26 | Re: WIP: pg_pretty_query |
Previous Message | Tom Lane | 2012-08-07 17:40:08 | Re: WIP patch for LATERAL subqueries |