pg_rewind issue

From: James Sewell <james(dot)sewell(at)jirotech(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: pg_rewind issue
Date: 2017-09-18 04:36:09
Message-ID: CAANVwEteGkEoTS1uJgwNouTURFo1K=qcNNJ=rxPQhQFYGN8GhA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi All,

pg_rewind is failing to bring an old master back into a workable state. I'm
wondering if I'm missing a step?

EDB 9.6.4 using pg_backrest for archive management.

High write rate throughout this process.

Steps to cause:

- Stop old master
- Promote old standby to new master
- Force checkpoint on new master
- Run pg_rewind (1) on old master
- Start old master with correct recovery.conf

After all archives are pulled from the new master seeing this in the
standby logs:

2017-09-07 14:59:40 AEST [117796]: [3-1] user=,db=,client= (0:00000)LOG:
entering standby mode
2017-09-07 14:59:41 AEST [117796]: [4-1] user=,db=,client= (0:00000)LOG:
restored log file "00000015.history" from archive
2017-09-07 14:59:42 AEST [117796]: [5-1] user=,db=,client= (0:00000)LOG:
restored log file "0000001500000C7400000044" from archive
2017-09-07 14:59:42 AEST [117796]: [6-1] user=,db=,client= (0:00000)LOG:
unexpected pageaddr C6F/C8000000 in log segment 0000001500000C7400000044,
offset 0
2017-09-07 14:59:42 AEST [118045]: [1-1] user=,db=,client= (0:00000)LOG:
started streaming WAL from primary at C73/A9000000 on timeline 21
2017-09-07 14:59:42 AEST [118045]: [2-1] user=,db=,client= (0:XX000)FATAL:
could not receive data from WAL stream: ERROR: requested WAL segment
0000001500000C73000000A9 has already been removed

When Iook at timeline 15 I see this:

20 C74/45000000 no recovery target specified+

As 0000001500000C73000000A9 > 0000001500000C7400000044 I'm confused why
this WAL would be required? It's never been created on either server
(although the same suffix does exist in timeline 14).

Cheers,
James Sewell

(1) /usr/edb/as9.6/bin/pg_rewind --target-pgdata=/ppas/9.6/data/pg_data
--source-server="host =10.154.19.24 port=5432 user=postgres
dbname=postgres"

--

------------------------------
The contents of this email are confidential and may be subject to legal or
professional privilege and copyright. No representation is made that this
email is free of viruses or other defects. If you have received this
communication in error, you may not copy or distribute any part of it or
otherwise disclose its contents to anyone. Please advise the sender of your
incorrect receipt of this correspondence.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Frank Millman 2017-09-18 05:38:18 Re: a JOIN to a VIEW seems slow
Previous Message David G. Johnston 2017-09-18 01:43:00 Re: Selecting a daily puzzle record - which type of column to add?