Re: BUG #13010: After promote postgres try to send old timeline WALs to archive

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: eshkinkot(at)gmail(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org, hlinnaka(at)iki(dot)fi
Subject: Re: BUG #13010: After promote postgres try to send old timeline WALs to archive
Date: 2015-04-10 05:16:35
Message-ID: CAB7nPqSEAzvQO2Hqmae3yyn0mP231qDJH-sS5Xs7CbfJPVwQzw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Apr 9, 2015 at 11:02 PM, <eshkinkot(at)gmail(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Vladimir Borodin 2015-04-10 08:20:02 Re: BUG #12918: Segfault in BackendIdGetTransactionIds
Previous Message Stephen Frost 2015-04-09 22:16:38 Re: BUG #13004: PostgreSQL 9.5 policy for table bug?