forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite0058b6
committed
Theses buffer leaks are caused by indexes that are kept open between
calls. Outside a transaction, the backend detects them as bufferleaks; it sends a NOTICE, and frees them. This sometimes cause asegmentation fault (at least on Linux). These indexes are initializedon the first lo_read/lo_write/lo_tell call, and (normally) closedon a lo_close call. Thus the buffer leaks appear when lo directaccess functions are used, and not with lo_import/lo_export functions(libpq version calls lo_close before ending the command, and thebackend version uses another path).The included patches (against recent snapshot, and against 6.3.2)cause indexes to be closed on transaction end (that is on explicit'END' statment, or on command termination outside trasaction blocks),thus preventing the buffer leaks while increasing performance insidetransactions. Some (all?) 'classic' memory leaks are also removed.I hope it will be ok.--- Pascal ANDRE, graduated from Ecole Centrale Paris andre@via.ecp.fr1 parent7702d7a commite0058b6
File tree
5 files changed
+96
-9
lines changed- src
- backend
- access/transam
- libpq
- storage/large_object
- include
- libpq
- storage
5 files changed
+96
-9
lines changedLines changed: 13 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
137 | 137 |
| |
138 | 138 |
| |
139 | 139 |
| |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
140 | 145 |
| |
141 | 146 |
| |
142 | 147 |
| |
| |||
151 | 156 |
| |
152 | 157 |
| |
153 | 158 |
| |
| 159 | + | |
| 160 | + | |
| 161 | + | |
154 | 162 |
| |
155 | 163 |
| |
156 | 164 |
| |
| |||
889 | 897 |
| |
890 | 898 |
| |
891 | 899 |
| |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
892 | 904 |
| |
893 | 905 |
| |
894 | 906 |
| |
|
Lines changed: 23 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
41 | 41 |
| |
42 | 42 |
| |
43 | 43 |
| |
| 44 | + | |
| 45 | + | |
44 | 46 |
| |
45 | 47 |
| |
46 | 48 |
| |
| |||
52 | 54 |
| |
53 | 55 |
| |
54 | 56 |
| |
55 |
| - | |
56 | 57 |
| |
57 | 58 |
| |
58 | 59 |
| |
| |||
367 | 368 |
| |
368 | 369 |
| |
369 | 370 |
| |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
370 | 391 |
| |
371 | 392 |
| |
372 | 393 |
| |
|
Lines changed: 50 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
60 | 60 |
| |
61 | 61 |
| |
62 | 62 |
| |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
63 | 76 |
| |
64 | 77 |
| |
65 | 78 |
| |
| |||
261 | 274 |
| |
262 | 275 |
| |
263 | 276 |
| |
264 |
| - | |
| 277 | + | |
265 | 278 |
| |
| 279 | + | |
| 280 | + | |
| 281 | + | |
266 | 282 |
| |
267 | 283 |
| |
268 | 284 |
| |
| |||
546 | 562 |
| |
547 | 563 |
| |
548 | 564 |
| |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
549 | 587 |
| |
550 | 588 |
| |
551 | 589 |
| |
| |||
591 | 629 |
| |
592 | 630 |
| |
593 | 631 |
| |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
594 | 637 |
| |
595 |
| - | |
| 638 | + | |
596 | 639 |
| |
597 | 640 |
| |
598 | 641 |
| |
| |||
622 | 665 |
| |
623 | 666 |
| |
624 | 667 |
| |
625 |
| - | |
| 668 | + | |
626 | 669 |
| |
627 | 670 |
| |
628 | 671 |
| |
| |||
1179 | 1222 |
| |
1180 | 1223 |
| |
1181 | 1224 |
| |
| 1225 | + | |
1182 | 1226 |
| |
1183 | 1227 |
| |
1184 | 1228 |
| |
| |||
1192 | 1236 |
| |
1193 | 1237 |
| |
1194 | 1238 |
| |
| 1239 | + | |
1195 | 1240 |
| |
1196 | 1241 |
| |
1197 | 1242 |
| |
1198 | 1243 |
| |
1199 | 1244 |
| |
| 1245 | + | |
1200 | 1246 |
| |
1201 | 1247 |
| |
1202 | 1248 |
| |
|
Lines changed: 6 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
9 |
| - | |
| 9 | + | |
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
| |||
37 | 37 |
| |
38 | 38 |
| |
39 | 39 |
| |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
40 | 45 |
|
Lines changed: 4 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
54 | 54 |
| |
55 | 55 |
| |
56 | 56 |
| |
| 57 | + | |
| 58 | + | |
| 59 | + | |
57 | 60 |
|
0 commit comments
Comments
(0)