Re: [HACKERS] [BUG FIX] Removing NamedLWLockTrancheArray
От | Kyotaro HORIGUCHI |
---|---|
Тема | Re: [HACKERS] [BUG FIX] Removing NamedLWLockTrancheArray |
Дата | |
Msg-id | CAM103DtJdY7-vNStVM_FEp3D_85pBE1-d2VKKTOAJnDB-P5Kug@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] [BUG FIX] Removing NamedLWLockTrancheArray (Amit Kapila <amit.kapila16@gmail.com>) |
Ответы |
Re: [HACKERS] [BUG FIX] Removing NamedLWLockTrancheArray
|
Список | pgsql-hackers |
> You can read about usage of LWLocks in extensions from below location:
> https://www.postgresql.org/docs/devel/static/xfunc-c.html#idp86986416
> https://www.postgresql.org/docs/devel/static/xfunc-c.html#idp86986416
By the way, in the case of orafce, it uses LWLockRegisterTranche directly but only when !found. So if any backend other than the creator of the shmem want to access tranche, the puch tranche is not found on the process and crashes. I think this is it.
If no other modules is installed, registeriing a tranche even if found will supress the crash but it is not a solution at all.
At least for 9.6 or 10, orafce should do that following the documentation. But it still can crash from the problem by the separate NamedLWLockTrancheArray. (ID range check in LWLockInitialize would be useless if it is not used by extensions)
I'll continue considering this next week
regards,
---
Kyotaro Horiguchi
В списке pgsql-hackers по дате отправления: