Re: [HACKERS] jacana hung after failing to acquire random number

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [HACKERS] jacana hung after failing to acquire random number
Дата
Msg-id CAB7nPqRHvzxp3gufPMqRYKemqk8Ye_NVBD6SHu+BdKy=tF_iqw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] jacana hung after failing to acquire random number  (Heikki Linnakangas <hlinnaka@iki.fi>)
Список pgsql-hackers
On Mon, Dec 12, 2016 at 4:32 PM, Heikki Linnakangas <hlinnaka@iki.fi> wrote:
> That test is broken. It looks like the x"$VAR" = x"constant" idiom, but the left side of the comparison doesn't have
the'x'. Oops.
 

Good catch.

> This makes me wonder if we should work a bit harder to get a good error
> message, if acquiring a random number fails for any reason. This needs to
> work in the frontend as well backend, but we could still have an elog(LOG,
> ...) there, inside an #ifndef FRONTEND block.

Yeah, this has been itching me as well. We could allocate an error
string in a psprintf()'d string and let the callers of
pg_strong_backend() use it as they are responsible for the error
handling. What do you think?
-- 
Michael



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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: [HACKERS] jacana hung after failing to acquire random number
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] Hang in pldebugger after git commit : 98a64d0