From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: AIO v2.2 |
Date: | 2025-02-21 19:31:33 |
Message-ID: | 77wnjrkgzh6oydi5of7o4walq22wmyrdhydkkmedtjoyali6jd@d6mm3dcjugdo |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Masahiko Sawada | 2025-02-21 19:39:37 | Re: pg_trgm comparison bug on cross-architecture replication due to different char implementation |
Previous Message | Maiquel Grassi | 2025-02-21 19:08:44 | Re: Psql meta-command conninfo+ |