Re: pg_replication_origin_drop API potential race condition

Поиск
Список
Период
Сортировка
От Peter Smith
Тема Re: pg_replication_origin_drop API potential race condition
Дата
Msg-id CAHut+PtLxGUpUvxk_-T6xG=7UWpT=82fzdXh+Wgvbkg0x4U+oA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg_replication_origin_drop API potential race condition  (Amit Kapila <amit.kapila16@gmail.com>)
Ответы Re: pg_replication_origin_drop API potential race condition  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-hackers
On Wed, Feb 3, 2021 at 11:17 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

>
> How about if we call replorigin_by_name() inside replorigin_drop after
> acquiring the lock? Wouldn't that close this race condition? We are
> doing something similar for pg_replication_origin_advance().
>

Yes, that seems ok.

I wonder if it is better to isolate that locked portion
(replyorigin_by_name + replorigin_drop) so that in addition to being
called from pg_replication_origin_drop, we can call it internally from
PG code to safely drop the origins.

----
Kind Regards,
Peter Smith.
Fujitsu Australia



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

Предыдущее
От: Ajin Cherian
Дата:
Сообщение: Re: Single transaction in the tablesync worker?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: a curious case of force_parallel_mode = on with jit'ing