Re: Improve LWLock tranche name visibility across backends

From: Sami Imseih <samimseih(at)gmail(dot)com>
To: Alexander Lakhin <exclusion(at)gmail(dot)com>
Cc: Nathan Bossart <nathandbossart(at)gmail(dot)com>, Rahila Syed <rahilasyed90(at)gmail(dot)com>, Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Improve LWLock tranche name visibility across backends
Date: 2025-11-03 17:50:48
Message-ID: CAA5RZ0va93+wk3_6UYi52=b=xqbKtXvaM-Cj5moTir7nM-LA=Q@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>> I am not sure we need to do anything about this.
>
>
> Or maybe we just avoid the tranche_id from leaking
> in test_dsa_resowners() by making it a static variable
> and checking if we have a valid tranche id before calling
> LWLockNewTrancheId()? That is the proper pattern.

Like the attached.

--
Sami

Attachment Content-Type Size
v1-0001-Prevent-tranche_id-leak-in-test_dsa_resowners.patch application/octet-stream 1.7 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jacob Champion 2025-11-03 17:57:18 Re: test_json_parser/002_inline is kind of slow
Previous Message Álvaro Herrera 2025-11-03 17:44:31 psql --help=variables missing csv_fieldsep