Re: BUG #15638: pg_basebackup with --wal-method=stream incorrectlygenerates WAL segment created during backup

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: BUG #15638: pg_basebackup with --wal-method=stream incorrectlygenerates WAL segment created during backup
Дата
Msg-id 20190216152503.GK2240@paquier.xyz
обсуждение исходный текст
Ответ на BUG #15638: pg_basebackup with --wal-method=stream incorrectly generates WAL segment created during backup  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #15638: pg_basebackup with --wal-method=stream incorrectlygenerates WAL segment created during backup  ("Maeldron T." <maeldron@gmail.com>)
Re: BUG #15638: pg_basebackup with --wal-method=stream incorrectlygenerates WAL segment created during backup  (Maksim Milyutin <milyutinma@gmail.com>)
Список pgsql-bugs
On Sat, Feb 16, 2019 at 12:26:13AM +0000, PG Bug reporting form wrote:
> When new slave is created by taking base backup from the primary using
> pg_basebackup with --wal-method=stream option the WAL file generated during
> the backup is different (as compared with diff or cmp command) than that on
> the master and in WAL archive directory. Furthermore, this file does not
> exist in pg_wal/archive_status with .done extension on new slave, though it
> exists in pg_wal directory, resulting in failed attempt to archive this file
> when slave node is promoted as master node.
> 2019-02-15 14:15:58.872 PST [5369] DETAIL:  The failed archive command was:
> test ! -f /mnt/pgsql/archive/000000010000000000000002 && cp
> pg_wal/000000010000000000000002
> /mnt/pgsql/archive/000000010000000000000002

How do you promote your standby?  In Postgres 10, the last, partial
WAL segment of a past timeline generated at promotion is renamed
.partial to avoid any conflicts, so as this should normally not
happen if you do not use archive_mode = always.

Please note that your archive command is not safe.  For one, it does
not sync the archived segment before archive_command returns to the
backend..
--
Michael

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #15631: Generated as identity field in a temporary table with on commit drop corrupts system catalogs
Следующее
От: "Maeldron T."
Дата:
Сообщение: Re: BUG #15638: pg_basebackup with --wal-method=stream incorrectlygenerates WAL segment created during backup