Re: Unnecessary WAL archiving after failover

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Unnecessary WAL archiving after failover
Date: 2012-03-21 15:56:27
Message-ID: CA+TgmobjgLFZ7drjT8Zs7haH6pRAXN7pU_26eLAb_U22W6_D3Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Feb 29, 2012 at 5:48 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> Hi,
>
> In streaming replication, after failover, new master might have lots
> of un-applied
> WAL files with old timeline ID. They are the WAL files which were recycled as a
> future ones when the server was running as a standby. Since they will never be
> used later, they don't need to be archived after failover. But since they have
> neither .ready nor .done file in archive_status, checkpoints after
> failover newly
> create .reacy files for them, and then finally they are archived.
> Which might cause
> disk I/O spike both in WAL and archive storage.
>
> To avoid the above problem, I think that un-applied WAL files with old
> timeline ID
> should be marked as already-archived and recycled immediately at the end of
> recovery. Thought?

I'm not an expert on this, but that makes sense to me.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2012-03-21 15:58:22 Re: Command Triggers
Previous Message Robert Haas 2012-03-21 15:54:00 Re: Command Triggers