pgsql: Insert into getCopyDataMessage() the same logic that already
В списке pgsql-committers по дате отправления:
| От | tgl@postgresql.org (Tom Lane) |
|---|---|
| Тема | pgsql: Insert into getCopyDataMessage() the same logic that already |
| Дата | |
| Msg-id | 20080117212150.416B0754108@cvs.postgresql.org обсуждение исходный текст |
| Список | pgsql-committers |
Log Message:
-----------
Insert into getCopyDataMessage() the same logic that already existed in the
main code path for enlarging libpq's input buffer in one swoop when needing to
read a long data message. Without this, the code will double the buffer size,
read more data, notice it still hasn't got the whole message, and repeat till
it finally has a large enough buffer. Which wastes a lot of data-moving
effort and also memory (since malloc probably can't do anything very useful
with the freed-up smaller buffers). Not sure why this wasn't there already;
certainly the COPY data path is a place where we're quite likely to see long
data messages. I'm not backpatching though, since this is just a marginal
performance issue rather than a real bug.
Modified Files:
--------------
pgsql/src/interfaces/libpq:
fe-protocol3.c (r1.33 -> r1.34)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/libpq/fe-protocol3.c?r1=1.33&r2=1.34)
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера