Re: Make PQgetResult() not return NULL on out-of-memory error
| От | Fujii Masao |
|---|---|
| Тема | Re: Make PQgetResult() not return NULL on out-of-memory error |
| Дата | |
| Msg-id | CAHGQGwG_sv750JMUvN0A6WB7HTVTYmLsDNP3KfZhe1RSoodqjA@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: Make PQgetResult() not return NULL on out-of-memory error (Chao Li <li.evan.chao@gmail.com>) |
| Ответы |
Re: Make PQgetResult() not return NULL on out-of-memory error
|
| Список | pgsql-hackers |
> > Therefore, I wonder about closing the connection and resetting the status > > when OOM_result is retunred, by callling pqDropConnection() as handleFatalError() does. > > In this case, the connection status should also be set to CONNECTINO_BAD. There are many code paths in libpq that can trigger an out-of-memory error. However, this patch makes libpq drop the connection when OOM_result is returned, which likely covers only a subset of those cases. So I'm not sure dropping the connection only for OOM_result would meaningfully improve things. Perhaps it would be more consistent to drop the connection for any internal libpq error such as out-of-memory, though that might require invasive code changes and coul break existing applications, I'm afraid. Regards, -- Fujii Masao
В списке pgsql-hackers по дате отправления: