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

Поиск
Список
Период
Сортировка
От Ashish Gupta
Тема Re: Postgres 9.0.4 replication issue: FATAL: requested WAL segment 0000000100000B110000000D has already been removed
Дата
Msg-id CAH06V7Msmx204gmLu8FYayvirdgsrpQ2mRe96nu=HRmY9G0fLA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Postgres 9.0.4 replication issue: FATAL: requested WAL segment 0000000100000B110000000D has already been removed  ("Tomas Vondra" <tv@fuzzy.cz>)
Список pgsql-general
Hi Tomas,
 
Thanks. Increasing the wal_keep_segments to 4000 did the trick.
 
I will set up WAL archive as well.
Thanks again.
 
Ashish.
On Sat, Nov 19, 2011 at 5:59 PM, Tomas Vondra <tv@fuzzy.cz> wrote:
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 по дате отправления:

Предыдущее
От: Gavin Flower
Дата:
Сообщение: Re: Table Design question for gurus (without going to "NoSQL")...
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: How to install latest stable postgresql on Debian