Missing timeline history file after execution of pg_upgrade

From: <christian(dot)echerer(at)manroland-web(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: Missing timeline history file after execution of pg_upgrade
Date: 2014-11-10 13:48:40
Message-ID: D5359E0908278642BB1747131D62694DAB22560F@AUSMXMBX01.mrws.biz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,

after execution of pg_upgrade is the timeline history file (i.e. 00000002.history) in the new database cluster missing. Therefore, it is no longer possible to use this database cluster as the master for a streaming replication client.

Test description:
-----------------
- Running postgres database (Version 9.3.4)

- Setting Up WAL Archiving for this database named "Database A"

- Making a base backup of "Database A"

- Crash of "Database A"

- Do a recovering using a "Continuous archive backup" of "Database A"
(new timeline is created)

- Listing of data/pg_xlog (Database A) after recovering
-- 16777216 Oct 22 13:36 000000010000000000000006
-- 16777216 Oct 22 13:36 000000010000000000000007
-- 16777216 Oct 22 13:36 000000010000000000000008
-- 41 Oct 22 13:36 00000002.history
-- 16777216 Oct 22 13:36 000000020000000000000008
-- 16777216 Oct 22 13:38 000000020000000000000009
-- 16777216 Oct 22 13:54 00000002000000000000000A
-- 16777216 Oct 22 13:54 00000002000000000000000B
-- 16777216 Oct 22 13:54 00000002000000000000000C
-- 4096 Oct 22 13:54 archive_status/

- Install a new Postgres database (Version 9.3.4) named "Database B"

- Data transfer using pg_upgrade (Database A -> Database B)
(pg_upgrade is not necessary, but it would be a standard procedure, that should work also with the same Postgres version)

- Listing of data/pg_xlog (Database B)
-- 16777216 Oct 29 06:00 00000002000000000000000D
-- 16777216 Nov 5 06:00 00000002000000000000000E
-- 16777216 Nov 10 14:08 00000002000000000000000F
-- 4096 Oct 22 13:54 archive_status/

- Setup a streaming replication client named "Database C" on "Database B"

- 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

I have three questions:
1) Why pg_upgrade changed the timeline informations?
2) How do I get replication (Database B -> Database C) working?
3) Is this behavior intended. Is there a workaround for me?

Please help me to troubleshoot this problem. I will feedback any required information.

Thanks in advance
Christian
________________________________
manroland web systems GmbH -- Managing Director: Joern Gosse
Registered Office: Augsburg -- Trade Register: AG Augsburg -- HRB-No.: 26816 -- VAT: DE281389840

Confidentiality note:
This eMail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient, you are hereby notified that any use or dissemination of this communication is strictly prohibited. If you have received this eMail in error, then please delete this eMail.

! Please consider your environmental responsibility before printing this eMail !
________________________________

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Mark Steben 2014-11-11 22:07:20 pg_repack issues
Previous Message Devrim Gündüz 2014-11-07 17:46:13 Re: WARNING: psql version 8.4, server version 9.2.