Re: can while loop in ClockSweepTick function be kind of infinite loop in some cases?

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: can while loop in ClockSweepTick function be kind of infinite loop in some cases?
Дата
Msg-id CA+TgmoaXg=OUJTLYjuN-8J3iZe9xZUHKOeFO7EBAgugGy76Kqw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: can while loop in ClockSweepTick function be kind of infinite loop in some cases?  (Andres Freund <andres@anarazel.de>)
Ответы Re: can while loop in ClockSweepTick function be kind of infinite loop in some cases?  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Tue, Jan 10, 2023 at 12:40 PM Andres Freund <andres@anarazel.de> wrote:
> > I think. `expected = originalVictim + 1;` line should be in while loop
> > (before acquiring spin lock) so that, even in the case above, expected
> > variable is incremented for each loop and CAS operation will be successful
> > at some point.
> > Is my understanding correct? If so, I will send PR for fixing this issue.
>
> Yes, I think your understanding might be correct. Interesting that this
> apparently has never occurred.

Doesn't pg_atomic_compare_exchange_u32 set expected if it fails?

-- 
Robert Haas
EDB: http://www.enterprisedb.com



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

Предыдущее
От: Nathan Bossart
Дата:
Сообщение: Re: Avoiding "wrong tuple length" errors at the end of VACUUM on pg_database update (Backpatch of 947789f to v12 and v13)
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: logical decoding and replication of sequences, take 2