[GENERAL] FATAL: requested WAL segment has already been removed - Mailing list pgsql-general

From Patrick B
Subject [GENERAL] FATAL: requested WAL segment has already been removed
Date
Msg-id CAJNY3iu73vHYFzpuJ0tbt72RZa7o7Zq7NG-g1mxhuyRJHbY+rQ@mail.gmail.com
Whole thread Raw
List pgsql-general
Hi,

I got this scenario:

master01
--> slave01 ---> slave02 -----> slave03 -------> slave04

As you can see, slave03 replicates from slave02 and slave04 from slave03.

I'm promoting slave03 into a master, and trying to make slave04 to be able to connect to its new master.

AS i'm using PostgreSQL 9.1, I need to manually copy the .history files from pg_xlog on slave03 to pg_xlog on slave04 (I don't need to copy the wal files as my archive_command does that).


When I promote slave03:

pg_ctl promote -D datadir

... it works fine!

Then, I restart postgres on slave04 with the new history file and the message that I get is:

FATAL:  could not receive data from WAL stream: 00000000000400000001234 FATAL:  requested WAL segment has already been removed

Why does that happen? I can't find 00000000000400000001234 even on the slave03(new master)! wal_keep_segments is 500.

Thanks
Patrick

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: [GENERAL] psql error (encoding related?)
Next
From: Paul Ramsey
Date:
Subject: Re: [GENERAL] Improve PostGIS performance with 62 million rows?