Re: pg_basebackup WAL streamer shutdown is bogus - leading to slow tests

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: pg_basebackup WAL streamer shutdown is bogus - leading to slow tests
Дата
Msg-id 20220131004145.ek7bbv2s25aj5gsh@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: pg_basebackup WAL streamer shutdown is bogus - leading to slow tests  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Hi,

On 2022-01-29 13:47:13 -0800, Andres Freund wrote:
> Here's a version of the patch only creating the event once. Needs a small bit
> of comment polishing, but otherwise I think it's sane?

Ah, it needs a bit more. I was not cleaning up the event at the exit of
ReceiveXlogStream(). For pg_basebackup that perhaps wouldn't matter, but
pg_receivewal loops...

We don't have a good spot for cleaning up right now. ReceiveXlogStream() has
plenty returns. The attached changes those to a goto done; but pretty it is
not. But probably still the best way for the backbranches?

I think the receivelog.c interface probably could do with a bit of
cleanup... The control flow is quite complicated, with repeated checks all
over etc :(.  And the whole thing with giving the appearance of being
instantiatable multiple times, but then using global variables for state, is
...

Attached a revised version.

Greetings,

Andres Freund

Вложения

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: plperl on windows
Следующее
От: Peter Smith
Дата:
Сообщение: Re: row filtering for logical replication