Re: Prevent restored WAL files from being archived again Re: Unnecessary WAL archiving after failover

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Noah Misch <noah(at)leadboat(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Prevent restored WAL files from being archived again Re: Unnecessary WAL archiving after failover
Date: 2012-08-10 17:19:42
Message-ID: CAHGQGwFThu2+_1E7vatysn25RqJbBBt7+EF7oQ=naNYGOc9HSA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Aug 9, 2012 at 8:08 AM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> On 29 July 2012 16:01, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>
>> Attached patch changes the startup process so that it creates .done file
>> whenever WAL file is successfully restored, whether archive mode is
>> enabled or not. The restored WAL files will not be archived again because
>> of .done file.
>
> The proposed patch works, for archiving only, but I don't like the
> code. It's a partial refactoring of existing code.
>
> I prefer to go for a full re-factoring version for HEAD, and a zero
> refactoring version for 9.2 since we're deep into beta.

Sounds reasonable.

> I've committed the simplified version for 9.2, as well as adding
> support for streaming which you seem to have missed out.

If the streaming case really must be covered, the fix should be backported to
9.1 and 9.0? Because there is the same "problem" in those versions.

But I'm not sure if this fix is right thing to do. I didn't add any code to the
streaming case because the current behavior exists since 9.0 and AFAIR
we've not received the complaints about the behavior. So ISTM changing
that behavior is debatable and looks like 9.3 item rather than 9.2.

Regards,

--
Fujii Masao

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2012-08-10 17:46:07 Re: Prevent restored WAL files from being archived again Re: Unnecessary WAL archiving after failover
Previous Message Doug Coleman 2012-08-10 17:14:05 macports and brew postgresql --universal builds