Re: How to start slave after pg_basebackup. Why min_wal_size andwal_keep_segments are duplicated

Поиск
Список
Период
Сортировка
От Paul Förster
Тема Re: How to start slave after pg_basebackup. Why min_wal_size andwal_keep_segments are duplicated
Дата
Msg-id 58EE62CB-0436-41DF-A97F-6A2F07FB48FF@gmail.com
обсуждение исходный текст
Ответ на Re: How to start slave after pg_basebackup. Why min_wal_size and wal_keep_segments are duplicated  ("Andrus" <kobruleht2@hot.ee>)
Список pgsql-general
Hi Andrus,

> On 01. Jun, 2020, at 12:26, Andrus <kobruleht2@hot.ee> wrote:
> My script does the same thing as your comands.

no, it does not. And as long as you refuse to understand that, I can't help you.

> I want to create replication server.

no, you want to create a streaming replica.

> Old cluster is empty, from initdb. Backup is not needed

then why the mv stuff?

> pg_basebackup uses environment varuables if not specified in command line. So my script does the same thing.

have you looked at the other options?

> I tried
> sudo --user=postgres pg_basebackup ....
> but got error
> could not change directory to "/root": Permission denied

try
sudo su - postgres pg_basebackup ....

Note the "-"! It's essential to get the environment of postgres, which is what you want.

Cheers,
Paul


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

Предыдущее
От: "Andrus"
Дата:
Сообщение: Re: How to start slave after pg_basebackup. Why min_wal_size and wal_keep_segments are duplicated
Следующее
От: Julien Rouhaud
Дата:
Сообщение: Re: Vanishing unique constraint