Re: pg_backrest restore & streaming replication

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: pg_backrest restore & streaming replication
Дата
Msg-id 20160319170110.GC3127@tamriel.snowman.net
обсуждение исходный текст
Ответ на pg_backrest restore & streaming replication  (Aldo Sarmiento <aldo@bigpurpledot.com>)
Список pgsql-admin
Aldo,

* Aldo Sarmiento (aldo@bigpurpledot.com) wrote:
> This is the command I used: /usr/lib/backrest/bin/pg_backrest.pl
> --stanza=prod-9.4 restore --log-level-console=info
> --db-path=/var/lib/postgresql/9.4/replica --thread-max=4 --delta

> After starting the replica back up, I noticed that it was no longer doing
> streaming replication. Also I noticed the logs said something about not
> finding WAL logs that it expected to find (not sure if these two things are
> related).

The pgbackrest restore command which you used doesn't appear to have
included any of the settings necessary to set up a streaming replica.
I'm guessing they also weren't included in the pg_backrest.conf file.

The only parameters that pgbackrest sets in the recovery.conf by default
are those necessary to acquire the necessary XLOGs during restore (the
recovery_command option).

To add other options to the recovery.conf file (such as those required
to start the system as a replica), you can use the --recovery-option to
pgbackrest, or add a '[stanza:restore:recovery-option]' section to the
pg_backrest.conf file being used.

The pgbackrest user guide includes an example of setting up the
pg_backrest.conf file with the necessary options:

http://www.pgbackrest.org/user-guide.html

The "not found" messages are completely normal and expected, PG will ask
for XLOGs which don't exist and pgbackrest is just logging that it was
asked for an XLOG which didn't exist.

Thanks!

Stephen

Вложения

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

Предыдущее
От: Albe Laurenz
Дата:
Сообщение: Re: Migration from OracleDB to Postgres
Следующее
От: Nicolas Aubert
Дата:
Сообщение: vacuum analyse waiting