Re: Wal files - Question | Postgres 9.2

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Wal files - Question | Postgres 9.2
Дата
Msg-id CAB7nPqR89mZApPar33+3C1RXuBLoS3XxEg=8Yvg9Mm-XscEeOA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Wal files - Question | Postgres 9.2  (Patrick B <patrickbakerbr@gmail.com>)
Список pgsql-general
On Fri, Nov 25, 2016 at 10:05 AM, Patrick B <patrickbakerbr@gmail.com> wrote:
> If I get messages like:
>
> cp: cannot stat '/walfiles/0000000200001AF8000000A5': No such file or
> directory
>
> In my head, it's saying that it was unable to recover that file and, because
> of that, there is missing data.
> Even if the server is able to connect to tbe master via streaming
> replication, there might be missing data. There might be data that is into
> master but not into slave.
>
> Am I wrong? If so, I don't understand why are the wal_files for, then.

In order, a startup process will look for a WAL segments in its local
pg_xlog, then using restore_command, and finally via streaming
(XLogPageRead in xlog.c). If streaming fails, because for example the
segment requested has already been recycled, then startup process
switches back to a lookup in archive/pg_xlog. If you happen to have
repetitive failures with restore_command, you are missing a segment
and the standby would not be able to replay further. If the segment is
indeed missing, a new base backup is the way to go. A standby without
the WAL segments to replay is useless except if you plan to use PITR
and restore to a position before the last segment available in its
timeline history.
--
Michael


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

Предыдущее
От: Patrick B
Дата:
Сообщение: Re: Wal files - Question | Postgres 9.2
Следующее
От: rob stone
Дата:
Сообщение: Re: query locks up when run concurrently