forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitfb0f5f0
committed
Fix memory leak when de-toasting compressed values in VACUUM FULL/CLUSTER
VACUUM FULL and CLUSTER can be used to enforce the use of the existingcompression method of a toastable column if a value currently stored iscompressed with a method that does not match the column's definedmethod. The code in charge of decompressing and recompressing toastvalues at rewrite left around the detoasted values, causing anaccumulation of memory allocated in TopTransactionContext.When processing large relations, this could cause the system to run outof memory. The detoasted values are not needed once their tuple isrewritten, and this commit ensures that the necessary cleanup happens.Issue introduced bybbe0a81. The comments of the area are reordered abit while on it.Reported-by: Andres FreundAnalyzed-by: Andres FreundAuthor: Michael PaquierReviewed-by: Dilip KumarDiscussion:https://postgr.es/m/20210521211929.pcehg6f23icwstdb@alap3.anarazel.de1 parent0c6b92d commitfb0f5f0
1 file changed
+22
-9
lines changedLines changed: 22 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2463 | 2463 |
| |
2464 | 2464 |
| |
2465 | 2465 |
| |
| 2466 | + | |
| 2467 | + | |
| 2468 | + | |
2466 | 2469 |
| |
2467 | 2470 |
| |
2468 | 2471 |
| |
2469 |
| - | |
2470 | 2472 |
| |
2471 | 2473 |
| |
| 2474 | + | |
2472 | 2475 |
| |
2473 | 2476 |
| |
2474 |
| - | |
2475 |
| - | |
2476 |
| - | |
2477 |
| - | |
2478 |
| - | |
2479 |
| - | |
2480 |
| - | |
2481 |
| - | |
2482 | 2477 |
| |
2483 | 2478 |
| |
| 2479 | + | |
| 2480 | + | |
| 2481 | + | |
| 2482 | + | |
| 2483 | + | |
| 2484 | + | |
| 2485 | + | |
| 2486 | + | |
2484 | 2487 |
| |
2485 | 2488 |
| |
2486 | 2489 |
| |
| |||
2507 | 2510 |
| |
2508 | 2511 |
| |
2509 | 2512 |
| |
| 2513 | + | |
2510 | 2514 |
| |
| 2515 | + | |
| 2516 | + | |
2511 | 2517 |
| |
2512 | 2518 |
| |
2513 | 2519 |
| |
| |||
2516 | 2522 |
| |
2517 | 2523 |
| |
2518 | 2524 |
| |
| 2525 | + | |
| 2526 | + | |
| 2527 | + | |
| 2528 | + | |
| 2529 | + | |
| 2530 | + | |
| 2531 | + | |
2519 | 2532 |
| |
2520 | 2533 |
| |
2521 | 2534 |
| |
|
0 commit comments
Comments
(0)