Re: CET ERROR: requested WAL segment has already been removed

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: CET ERROR: requested WAL segment has already been removed
Дата
Msg-id CABUevEwTLgBW_=UBqpD_PBHE3fCREqSUy-s=bcwmR1SVRaSGtw@mail.gmail.com
обсуждение исходный текст
Ответ на CET ERROR: requested WAL segment has already been removed  (Martin Terjan <martin@terjan.de>)
Список pgsql-general
On Fri, Feb 14, 2014 at 10:08 AM, Martin Terjan <martin@terjan.de> wrote:
Dear all,

Using Postgresql 9.3. on Windows x64.

I had streaming replication set up from master to slave, but the slave shut down and became out of sync with the master. So... I tried to set it back up, without success.

I then checked the *master* log and, although the server seems to be working, the log is full with
"CET ERROR: requested WAL segment 00000001000000090000008E has already been removed".

Note that the "CET" part of that message is actually the timezone of the timestamp of the log message, and not part of the actual error :)
 

What should I do? While I have this error replication fails, because the slave looks for the same (missing) WAL segment. The master seems to be working, but of course it's possible that I've lost data somewhere.

If you have log archiving set up, just configure your slave so it can access the log archive (as if restoring from a pitr backup - just add a restore_command to recovery.conf).

If you don't have log archiving set up, you must rebuild the slave when it has fallen so far behind that it can't catch up anymore. So a new base backup of it.

If you don't have a log archive, you should probably also set wal_keep_segments to a higher value to decrease the risk of it happening again.
 

Is there anything sensible I can do beyond restoring from the last good backup?

For the slave, yes. The master is perfectly fine, so you don't need to do anything about that one. The errors are listed in the master log because they are caused by commands sent from the slave, but they do not indicate a problem on the master.


--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

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

Предыдущее
От: Martin Terjan
Дата:
Сообщение: CET ERROR: requested WAL segment has already been removed
Следующее
От: salah jubeh
Дата:
Сообщение: pg_hba.conf analysis tool