Re: Lockless exit path for ReplicationOriginExitCleanup

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Lockless exit path for ReplicationOriginExitCleanup
Дата
Msg-id CAA4eK1KTn_uML5dFmr==uwX6ZboiD6TWoEabMZ_inqQtNnYC4w@mail.gmail.com
обсуждение исходный текст
Ответ на Lockless exit path for ReplicationOriginExitCleanup  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Ответы Re: Lockless exit path for ReplicationOriginExitCleanup  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Список pgsql-hackers
On Wed, Nov 22, 2023 at 2:12 PM Bharath Rupireddy
<bharath.rupireddyforpostgres@gmail.com> wrote:
>
> While looking at the use of session_replication_state, I noticed that
> ReplicationOriginLock is acquired in ReplicationOriginExitCleanup()
> even if session_replication_state is reset to NULL by
> replorigin_session_reset(). Why can't there be a lockless exit path
> something like [1] similar to
> replorigin_session_reset() which checks session_replication_state ==
> NULL without a lock?
>

I don't see any problem with such a check but not sure of the benefit
of doing so either.

--
With Regards,
Amit Kapila.



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Stop the search once replication origin is found
Следующее
От: John Naylor
Дата:
Сообщение: Commitfest 2023-11 update 2