Re: AIO v2.2

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: AIO v2.2
Дата
Msg-id 77wnjrkgzh6oydi5of7o4walq22wmyrdhydkkmedtjoyali6jd@d6mm3dcjugdo
обсуждение исходный текст
Ответ на Re: AIO v2.2  (Heikki Linnakangas <hlinnaka@iki.fi>)
Список pgsql-hackers
Hi,

I was just going through comments about LWLockDisown() and was reminded of
this:

On 2025-01-07 18:08:51 +0200, Heikki Linnakangas wrote:
> On LWLockDisown():
> > + * NB: This will leave lock->owner pointing to the current backend (if
> > + * LOCK_DEBUG is set). We could add a separate flag indicating that, but it
> > + * doesn't really seem worth it.
> 
> Hmm. I won't insist, but I feel it probably would be worth it. This is only
> in LOCK_DEBUG mode so there's no performance penalty in non-debug builds,
> and when you do compile with LOCK_DEBUG you probably appreciate any extra
> information.

I don't think that makes sense, as we, independent of this change, never clear
lock->owner. Not even when releasing a lock!  The background to that, I think,
is that there were some cases where we forgot to wake up all backends due to
race conditions, and that for that it's really useful to know the last owner.

That could perhaps be evolved or documented better, but it's pretty much
independent of the patch at hand.

Greetings,

Andres Freund



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