| От | Tom Lane |
|---|---|
| Тема | Re: Wierd memory problem with Apache / PHP. Related to |
| Дата | |
| Msg-id | 28954.1107359766@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Wierd memory problem with Apache / PHP. Related to (Jeff Davis <jdavis-pgsql@empires.org>) |
| Список | pgsql-general |
Jeff Davis <jdavis-pgsql@empires.org> writes:
> Developers: am I mistaken about libpq copying the entire query before
> sending it to the backend? Is there a reason that libpq wouldn't just
> send it along to the backend?
That's a feature, not a bug. libpq marshals whole messages before
sending them so that it can be sure it doesn't have a problem with
a half-sent message. The only way out of such a problem would be to
drop the connection, because there's no way to regain message boundary
sync with the backend.
If your SQL queries are so long as to pose a memory threat by
themselves, you might want to rethink your approach anyway. I'd
expect such things to hit bottlenecks all over the place. In particular
the backend is quite certain to make multiple copies of any long literal
constant during parsing/planning.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера