Re: Missing timeline history file after execution of pg_upgrade - Mailing list pgsql-admin

From Alexey Klyukin
Subject Re: Missing timeline history file after execution of pg_upgrade
Date
Msg-id CAAS3tyLcMjUDfjrqo3+dy257EjBAXkU_08z+GoxswCN-fzq74w@mail.gmail.com
Whole thread Raw
In response to Re: Missing timeline history file after execution of pg_upgrade  (<christian.echerer@manroland-web.com>)
Responses Re: Missing timeline history file after execution of pg_upgrade
List pgsql-admin
Hi,

On Mon, Feb 2, 2015 at 11:07 AM,  <christian.echerer@manroland-web.com> wrote:
>
> Short test description (Postgres-Version 9.3.4)
> --------------------------------------
> - Do a recovering on the Master (new timeline is created)
> - Execute pg_upgrade on the Master (timeline informations are missing)
> - Try to setup a new streaming client on the master
> - Error occurs: ... :  could not receive timeline history file from the primary server: ERROR:  could not open file
"pg_xlog/00000002.history":No such file or directory 
>
> A longer description can be found in the mail from 11.10.2014.
>
> How do I get streaming replication working again?
>
> My current workaround is to restore the master with the help of pg_restore, after updating the database server
version.It takes quite a long time, however, and is therefore a problem. 

The path to reproduce the problem is quite simple:

- setup the master and the replica setup, and promote the replica,
creating a new timeline (timeline 2 by default)
- pg_upgrade the promoted replica. This would create a new cluster
with the same timeline, but without the history file.
- create the streaming-only replica. The streaming replication will
never start, since the timeline file is not there. The error messages
are:

ERROR:  could not open file "pg_xlog/00000002.history": No such file
or directory
FATAL:  could not receive timeline history file from the primary
server: ERROR:  could not open file "pg_xlog/00000002.history": No
such file or directory

Note that this problem does not occur for the streaming-only replica
of the newly created cluster (with a timeline 1), even when there is
no timeline history file in the original datadir.

--
Regards,
Alexey Klyukin


pgsql-admin by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: Hi Community
Next
From: Alexey Klyukin
Date:
Subject: Re: Missing timeline history file after execution of pg_upgrade