Re: Question about 001_stream_rep.pl recovery test

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Question about 001_stream_rep.pl recovery test
Дата
Msg-id Ybc28Bx+9YbaPh3D@paquier.xyz
обсуждение исходный текст
Ответ на Question about 001_stream_rep.pl recovery test  (David Zhang <david.zhang@highgo.ca>)
Ответы Re: Question about 001_stream_rep.pl recovery test  (David Zhang <david.zhang@highgo.ca>)
Список pgsql-hackers
On Fri, Dec 10, 2021 at 01:44:40PM -0800, David Zhang wrote:
> Inside the test script `src/test/recovery/t/001_stream_rep.pl`, a comment at
> line 30 says `my_backup` is "not mandatory",
>
>  30 # Take backup of standby 1 (not mandatory, but useful to check if
>  31 # pg_basebackup works on a standby).
>  32 $node_standby_1->backup($backup_name);
>
> however if remove the backup folder "my_backup" after line 32, something
> like below,

Well, the comment is not completely incorrect IMO.  In this context, I
read taht that we don't need a backup from a standby and we could just
take a backup from the primary instead.  If I were to fix something, I
would suggest to reword the comment as follows:
# Take backup of standby 1 (could be taken from the primary, but this
# is useful to check if pg_basebackup works on a standby).

> And then the test script takes another backup `my_backup_2`, but it seems
> this backup is not used anywhere.

This had better stay around, per commit f267c1c.  And as far as I can
see, we don't have an equivalent test in a different place, where
pg_basebackup runs on a standby while its *primary* is stopped.
--
Michael

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Assertion failure with replication origins and PREPARE TRANSACTIOn
Следующее
От: "osumi.takamichi@fujitsu.com"
Дата:
Сообщение: RE: Failed transaction statistics to measure the logical replication progress