Recovery from WAL archives not advancing timeline?

Поиск
Список
Период
Сортировка
От Don Seiler
Тема Recovery from WAL archives not advancing timeline?
Дата
Msg-id CAHJZqBBk1cgbvXevUuAGTsbMTYx6_BDwwUqV_4ne_QUG=AuMmw@mail.gmail.com
обсуждение исходный текст
Ответы Re: Recovery from WAL archives not advancing timeline?  (Ian Lawrence Barwick <barwick@gmail.com>)
Список pgsql-admin
PostgreSQL 9.6

I shut down the primary and promoted the replica (timeline advanced from 1 to 2).

I then put a recovery.conf on the old primary so it would recover by WAL restore (not streaming). However it seems to refuse to see the new timeline. I do have recovery_target_timeline='latest', my full recovery.conf looks like this:

standby_mode = 'on'
restore_command = 'envdir /etc/wal-g/environment /usr/local/bin/wal-g wal-fetch %f %p'
recovery_target_timeline = 'latest'

However the new replica complains:
ERROR: 2020/08/08 06:28:34.876197 openpgp: invalid argument: no armored data found
ERROR: 2020/08/08 06:28:39.621300 Archive '000000010000142E0000005B' does not exist.

The new primary wrote that file but under timeline 2, I see 000000020000142E0000005B in the archive, along with the expected 00000002.history file.

So why doesn't the new replica see that there are no more TL1 WAL files and advance to TL2? There are still some files in its pg_xlog dir on that replica, would it be safe to shut it down and clear them out?

--
Don Seiler
www.seiler.us

В списке pgsql-admin по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: PostgreSQL-11 partition creation issue
Следующее
От: Hotmail
Дата:
Сообщение: PostgreSQL JDBC Driver ERROR: invalid byte sequence for encoding "UTF8": 0x00 on Select stmt