Re: [RFC] Lock-free XLog Reservation from WAL
От | Japin Li |
---|---|
Тема | Re: [RFC] Lock-free XLog Reservation from WAL |
Дата | |
Msg-id | ME0P300MB044564F09A87AD262BE0C792B6E12@ME0P300MB0445.AUSP300.PROD.OUTLOOK.COM обсуждение исходный текст |
Список | pgsql-hackers |
On Wed, 22 Jan 2025 at 17:02, Yura Sokolov <y.sokolov@postgrespro.ru> wrote: > I believe, I know why it happens: I was in hurry making v2 by > cherry-picking internal version. I reverted some changes in > CalcCuckooPositions manually and forgot to add modulo > PREV_LINKS_HASH_CAPA. > > Here's the fix: > > pos->pos[0] = hash % PREV_LINKS_HASH_CAPA; > - pos->pos[1] = pos->pos[0] + 1; > + pos->pos[1] = (pos->pos[0] + 1) % PREV_LINKS_HASH_CAPA; > pos->pos[2] = (hash >> 16) % PREV_LINKS_HASH_CAPA; > - pos->pos[3] = pos->pos[2] + 2; > + pos->pos[3] = (pos->pos[2] + 2) % PREV_LINKS_HASH_CAPA; > > Any way, here's v3: > - excess file "v0-0001-Increase..." removed. I believe it was source > of white-space apply warnings. > - this mistake fixed > - more clear slots strategies + "8 positions in two cache-lines" strategy. > > You may play with switching PREV_LINKS_HASH_STRATEGY to 2 or 3 and see > if it affects measurably. Thanks for your quick fixing. I will retest it tomorrow. -- Regrads, Japin Li
В списке pgsql-hackers по дате отправления: