Re: Allow processes to reset procArrayGroupNext themselves instead of leader resetting for all the followers

Поиск
Список
Период
Сортировка
От Bharath Rupireddy
Тема Re: Allow processes to reset procArrayGroupNext themselves instead of leader resetting for all the followers
Дата
Msg-id CALj2ACXaBuFy=kdgX_Hii0dMfj3aXnu6iP+mEgU_MtxtZ3cKJQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Allow processes to reset procArrayGroupNext themselves instead of leader resetting for all the followers  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Sun, Nov 27, 2022 at 2:48 AM Andres Freund <andres@anarazel.de> wrote:
>
> Hi,
>
> On 2022-11-24 10:43:46 +0530, Bharath Rupireddy wrote:
> > While working on something else, I noticed that the proc array group
> > XID clearing leader resets procArrayGroupNext of all the followers
> > atomically along with procArrayGroupMember. ISTM that it's enough for
> > the followers to exit the wait loop and continue if the leader resets
> > just procArrayGroupMember, the followers can reset procArrayGroupNext
> > by themselves. This relieves the leader a bit, especially when there
> > are many followers, as it avoids a bunch of atomic writes and
> > pg_write_barrier() for the leader .
>
> I doubt this is a useful change - the leader already has to modify the
> relevant cacheline (for procArrayGroupMember). That makes it pretty much free
> to modify another field in the same cacheline.

Agreed. Thanks for the response.

-- 
Bharath Rupireddy
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com



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

Предыдущее
От: Bharath Rupireddy
Дата:
Сообщение: Re: Reducing power consumption on idle servers
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: Collation version tracking for macOS