Re: possible bug not in open items
От | Tom Lane |
---|---|
Тема | Re: possible bug not in open items |
Дата | |
Msg-id | 28362.1239389252@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: possible bug not in open items (Jeff Davis <pgsql@j-davis.com>) |
Ответы |
Re: possible bug not in open items
|
Список | pgsql-bugs |
Jeff Davis <pgsql@j-davis.com> writes: > Here is a patch that does what I think Heikki was suggesting. If a > proper fix is non-trivial, then I assume there's some problem with my > patch, but I'll post it for the archives anyway. This patch is so wrong that it's scary. You can't have ImmediateInterruptOK true over the duration of any significant amount of backend processing --- as an example, if you take control away in the middle of a malloc call, you'll probably be left with a corrupt malloc arena. It doesn't even work to try to take control away while control is inside, say, the OpenSSL code. The reason we have the prepare_for_client_read/client_read_ended hooks is to allow the flag to be turned on over a sufficiently narrow scope --- to wit, the recv() kernel call and nothing else --- that it's safe. AFAICS, a safe patch for this has got to involve teaching those hooks about COPY mode. regards, tom lane
В списке pgsql-bugs по дате отправления: