Re: Problem with synchronous replication

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Problem with synchronous replication
Дата
Msg-id 20191031013056.GB2530@paquier.xyz
обсуждение исходный текст
Ответ на Re: Problem with synchronous replication  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Список pgsql-hackers
On Wed, Oct 30, 2019 at 12:34:28PM +0900, Kyotaro Horiguchi wrote:
> If we do that strictly, other functions like
> SyncRepGetOldestSyncRecPtr need the same Assert()s. I think static
> functions don't need Assert() and caution in their comments would be
> enough.

Perhaps.  I'd rather be careful though if we meddle again with this
code in the future as it is shared across multiple places and
callers.

> SyncRepReleaseWaiters reads MyWalSnd->sync_standby_priority without
> holding SyncRepLock, which could lead to a message with wrong
> priority. I'm not sure it matters, though.

The WAL sender is the only writer of its info in shared memory, so
there is no problem to have it read data without its spin lock hold.

> Seems reasonable for holdoffs. The same assertion would be needed in
> more places but it's another issue.

Sure.

> By the way while I was looking this, I found a typo. Please find the
> attached.

Thanks, applied that one.
--
Michael

Вложения

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

Предыдущее
От: Taylor Vesely
Дата:
Сообщение: Re: Zedstore - compressed in-core columnar storage
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Problem with synchronous replication