Former Standby Wants to Archive Old WAL files?

From: Don Seiler <don(at)seiler(dot)us>
To: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Former Standby Wants to Archive Old WAL files?
Date: 2017-12-04 21:44:50
Message-ID: CAHJZqBDmOcfVm4CcxqWetTyhe=r14dEe-1E9xS+H8srTEwEOdw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

I'm setting up a test primary/standby setup from two clones of a prod DR
standby.

The steps were as follows:

1. create DB01 and DB02 from the same DR backup
2. Let them run through crash recovery.
3. Change DB02 to use DB01 as its master for streaming replication
4. Open DB01 as a new master, archiving its WALs

This all seems to be fine, except for DB01 trying to archive WALs. It keeps
complaining that it can't archive WAL files that, judging from the ID
number in the file name are really, really old.

In this case, the current WAL file at the time of opening the DB
was 000000010000121B00000095. The DB then further created WAL
files 000000010000121B00000096 and 000000010000121B00000097. However in the
server log I see warnings about being unable to archive WAL
file 000000010000000000000001! On a lark, I did a
"touch 000000010000000000000001" in pg_xlog, which it seemed to archive and
then it asked for more older file names. For example these were the next
few:

- 000000010000045700000047
- 000000010000046E00000035
- 00000001000004740000007A
- etc

These are nowhere close to the WAL files that we've been processing today
or even this past month. Why is it looking to archive these? Is there a way
I can tell it to skip/forget these so it can start archiving the current
set?

Don.

--
Don Seiler
www.seiler.us

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Don Seiler 2017-12-04 21:54:00 Re: Former Standby Wants to Archive Old WAL files?
Previous Message Adrien Nayrat 2017-12-04 21:37:27 Re: No stats after promoting standby?