Re: Backup command and functions can cause assertion failure and segmentation fault

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Backup command and functions can cause assertion failure and segmentation fault
Дата
Msg-id YsYkPzSpnr5Yt3uA@paquier.xyz
обсуждение исходный текст
Ответ на Re: Backup command and functions can cause assertion failure and segmentation fault  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Список pgsql-hackers
On Wed, Jul 06, 2022 at 11:27:58PM +0900, Fujii Masao wrote:
> For the test, BASE_BACKUP needs to be canceled after it finishes
> do_pg_backup_start(), i.e., checkpointing, and before it calls
> do_pg_backup_stop(). So the timing to cancel that seems more severe
> than the test added in 0475a97f. I'm afraid that some tests can
> easily cancel the BASE_BACKUP while it's performing a checkpoint in
> do_pg_backup_start(). So for now I'm thinking to avoid such an
> unstable test.

Hmm.  In order to make sure that the checkpoint of the base backup is
completed, and assuming that the checkpoint is fast while the base
backup has a max rate, you could rely on a query that does a
poll_query_until() on pg_control_checkpoint(), no?  As long as you use
IPC::Run::start, pg_basebackup would be async so the polling query and
the cancellation can be done in parallel of it.  0475a97 did almost
that, except that it waits for the WAL sender to be started.
--
Michael

Вложения

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs)
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Bump MIN_WINNT to 0x0600 (Vista) as minimal runtime in 16~