Re: pg_basebackup fails: could not receive data from WAL stream:server closed the connection unexpectedly

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: pg_basebackup fails: could not receive data from WAL stream:server closed the connection unexpectedly
Дата
Msg-id 20181204140512.GO3415@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: pg_basebackup fails: could not receive data from WAL stream: serverclosed the connection unexpectedly  (AYahorau@ibagroup.eu)
Ответы Re: pg_basebackup fails: could not receive data from WAL stream: serverclosed the connection unexpectedly  (AYahorau@ibagroup.eu)
Список pgsql-admin
Greetings,

* AYahorau@ibagroup.eu (AYahorau@ibagroup.eu) wrote:
> I reckon we can return to more conventional approach of postgres db
> synchronization:
> 1) SELECT pg_start_backup('label', true);
> 2) rsync/cp  $PGDATA directory;
> 3) SELECT pg_stop_backup();

It doesn't seem clear what the goal here is- if you are looking to have
two DB servers that are synchronized, then using pg_basebackup to get
the initial copy and then running PostgreSQL as a replica would be the
right approach.

I certainly wouldn't recommend trying to hack together something with
rsync or cp or using the exclusive backup mode at all- if the system
crashes when that exclusive backup is happening, the database won't come
back up.

> I have a question. What is your opinion about pg_basebackup utility and
> its behaviour for this condition?  Is it a bug? Should it be fixed?

No, I don't see any bug here, but if you adjust the timeout values on
the server then you need to tell pg_basebackup to send messages to the
server more frequently or it's going to get timed out.  That's what the
--status-interval option in pg_basebackup is for.

Thanks!

Stephen

Вложения

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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: pg_basebackup fails: could not receive data from WAL stream:server closed the connection unexpectedly
Следующее
От: AYahorau@ibagroup.eu
Дата:
Сообщение: Re: pg_basebackup fails: could not receive data from WAL stream: serverclosed the connection unexpectedly