Re: Improve LWLock tranche name visibility across backends

Поиск
Список
Период
Сортировка
От Sami Imseih
Тема Re: Improve LWLock tranche name visibility across backends
Дата
Msg-id CAA5RZ0u8+sC_FBwoaUeLhTi5bmjba9Yk3N-TbdsTm7c1no0zcg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Improve LWLock tranche name visibility across backends  (Alexander Lakhin <exclusion@gmail.com>)
Ответы Re: Improve LWLock tranche name visibility across backends
Список pgsql-hackers
> I've discovered (with SQLsmith) that the new possible error makes
> pg_prewarm/autoprewarm fail when the error triggered during it's
> initialization and then another instance tries to acquire apw_state->lock.

From just a quick look at this, it does not seem to be the fault
of the error message itself, but because we no longer can
tolerate leaks in new tranche IDs. Currently the function shows:

/* XXX: this tranche is leaked */
tranche_id = LWLockNewTrancheId("test_dsa");

the test_dsa_resowners seems to not be handling
such scenarios and releasing locks, etc somewhere. If you modify
the function test_dsa_resowners and only keep the
LWLockNewTrancheId call, like this:

"
PG_FUNCTION_INFO_V1(test_dsa_resowners);
Datum
test_dsa_resowners(PG_FUNCTION_ARGS)
{
LWLockNewTrancheId("test_dsa");

PG_RETURN_VOID();
}
"
it does not repro.

Not really sure why this required "debug_parallel_query"
to be ON either, but that option itself should also be
used with caution.

I am not sure we need to do anything about this.


--
Sami Imseih
Amazon Web Services (AWS)



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