Re: GetNamedLWLockTranche crashes on Windows in normal backend

Поиск
Список
Период
Сортировка
От Sami Imseih
Тема Re: GetNamedLWLockTranche crashes on Windows in normal backend
Дата
Msg-id CAA5RZ0s_hbrLBmRDydii6Zfpo-dQFkVjp91V0yrgUbTfpC+KTg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: GetNamedLWLockTranche crashes on Windows in normal backend  (Nathan Bossart <nathandbossart@gmail.com>)
Ответы Re: GetNamedLWLockTranche crashes on Windows in normal backend
Список pgsql-hackers
> On Mon, Sep 08, 2025 at 02:47:26PM -0500, Sami Imseih wrote:
> > I think v2 is fine because it is perfectly fine for a normal backend
> > (EXEC_BACKEND) to call this function as long as it's processing the
> > startup hook. The goal is to prevent it from being called outside of the
> > startup hook.
>
> I thought the goal was to prevent the crashes...

yes it is. Ok, I see what I did wrong with my test that showed v2 working in
EXEC_BACKEND. when it was reentering the startup hook, it was skipping
the code under (!found) for shared memory existing. That is also where I
had the code to call GetNamedLWLockTranche. So, that's wrong
( which is what you also mentioned above) I moved
the GetNamedLWLockTranche outside of the (!found) block in the test.

> > I think we should commit these tests as well. If  you think the tests
> > should be a separate thread, let me know.
>
> Thanks.  I think we can discuss them here once we fix $SUBJECT.  (BTW it
> looks like you forgot to attach the patches.)

oops. Attached now.


--
Sami

Вложения

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