Re: Postgres 9.0.4 replication issue: FATAL: requested WAL segment 0000000100000B110000000D has already been removed

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: Postgres 9.0.4 replication issue: FATAL: requested WAL segment 0000000100000B110000000D has already been removed
Дата
Msg-id 28495974b30f304b064b36c372654517.squirrel@sq.gransy.com
обсуждение исходный текст
Ответ на Postgres 9.0.4 replication issue: FATAL: requested WAL segment 0000000100000B110000000D has already been removed  (Ashish Gupta <ashish.gupta.cal@gmail.com>)
Ответы Re: Postgres 9.0.4 replication issue: FATAL: requested WAL segment 0000000100000B110000000D has already been removed  (Ashish Gupta <ashish.gupta.cal@gmail.com>)
Список pgsql-general
Hi,

On 19 Listopad 2011, 10:44, Ashish Gupta wrote:
> I searched on various forums, where people encountered similar error,
> however in all such issues WAL file existed on Master. In this case Master
> is not retaining the WAL file required by the Slave.
>
> I am unable to understand as to why Master is not retaining the WAL files.
> Any pointer/suggestions would be helpful.
> Thanks for attention.

The cause is very simple - the standby needs all WAL segments created
since the backup started, but the master removes some of them. There are
two ways to fix this:

1) increase the wal_keep_segments so that enough segments is kept

It seems that the slave asked for B110000000D when master already created
B110000000D. That's almost 4000 segments if I'm counting correctly. That
means your database is either quite busy or the backup takes very long
time.

This stores all the data on master, so you'll have to keep that in mind
when planning the capacity. For example the 4000 segments are almost 64GB.

2) Set up a WAL archive - a separate instance where the WAL segments are
kept. See how the archive_command works. And there's pg_archivecleanup for
maintenance of the archive.

Tomas


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

Предыдущее
От: Ken Tanzer
Дата:
Сообщение: Replacement for tgisconstraint? (Upgrade from 8.4 to 9.0.5)
Следующее
От: "Andrus"
Дата:
Сообщение: Re: How to install latest stable postgresql on Debian