pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael.paquier@gmail.com>
To: eshkinkot@gmail.com
Cc: pgsql-bugs@postgresql.org
Cc: hlinnaka@iki.fi
Subject: Re: BUG #13010: After promote postgres try to send old timeline WALs to archive
Date: Fri, 10 Apr 2015 14:16:35 +0900
Message-ID: <CAB7nPqSEAzvQO2Hqmae3yyn0mP231qDJH-sS5Xs7CbfJPVwQzw@mail.gmail.com> (raw)
In-Reply-To: <20150409140218.26383.3403@wrigleys.postgresql.org>
References: <20150409140218.26383.3403@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On Thu, Apr 9, 2015 at 11:02 PM,  <eshkinkot@gmail.com> wrote:
> I do not use streaming, only WAL archive and after promote standby
> it try to archive WALs with old timeline, but I already have it in
> archive (from old master) and at new master WAL archiving stopped.
>
> [...]
> now WAL archiving stopped with messages:
>
> 2015-04-08 20:49:31 MSK LOG:  archive command failed with exit code 1
> 2015-04-08 20:49:31 MSK DETAIL:  The failed archive command was: test ! -f
> ~/tmp/pg-slave-switch/w/000000010000000000000025 && cp
> pg_xlog/000000010000000000000025
> ~/tmp/pg-slave-switch/w/000000010000000000000025
> 2015-04-08 20:49:32 MSK LOG:  archive command failed with exit code 1

The standby has recycled some WAL segments ahead thinking to reuse
them and at promotion they became actually bogus. It is an expected
behavior for a standby to archive the files that it thinks are not
archived yet after promotion even if they are not of its own timeline,
but those bogus segments should never be archived. See this thread for
example that has a patch:
http://www.postgresql.org/message-id/54942034.7080303@vmware.com
Note that I got this patch on my list-of-things-to-look-at for some
time, perhaps it is time to accelerate the move.
Regards,
-- 
Michael


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (3+ messages)  latest in thread

Message-ID: <CAB7nPqSEAzvQO2Hqmae3yyn0mP231qDJH-sS5Xs7CbfJPVwQzw@mail.gmail.com>
Permalink:  ../CAB7nPqSEAzvQO2Hqmae3yyn0mP231qDJH-sS5Xs7CbfJPVwQzw@mail.gmail.com/
Also on:    postgresql.org/message-id/CAB7nPqSEAzvQO2Hqmae3yyn0mP231qDJH-sS5Xs7CbfJPVwQzw@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: michael.paquier@gmail.com, eshkinkot@gmail.com, hlinnaka@iki.fi
  Subject: Re: BUG #13010: After promote postgres try to send old timeline WALs to archive
  In-Reply-To: <CAB7nPqSEAzvQO2Hqmae3yyn0mP231qDJH-sS5Xs7CbfJPVwQzw@mail.gmail.com>
  References: <20150409140218.26383.3403@wrigleys.postgresql.org> <CAB7nPqSEAzvQO2Hqmae3yyn0mP231qDJH-sS5Xs7CbfJPVwQzw@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox