forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit70066eb
committed
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 toread 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 tillit finally has a large enough buffer. Which wastes a lot of data-movingeffort and also memory (since malloc probably can't do anything very usefulwith 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 longdata messages. I'm not backpatching though, since this is just a marginalperformance issue rather than a real bug.1 parenta44174c commit70066eb
1 file changed
+18
-1
lines changedLines changed: 18 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
1305 | 1305 |
| |
1306 | 1306 |
| |
1307 | 1307 |
| |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
1308 | 1324 |
| |
| 1325 | + | |
1309 | 1326 |
| |
1310 | 1327 |
| |
1311 | 1328 |
| |
|
0 commit comments
Comments
(0)