forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc5c000b

Amit Kapila
Fix ReorderBuffer memory overflow check.
Commitcec2edf introduced logical_decoding_work_mem to limitReorderBuffer memory usage. We spill the changes once the memory occupiedby changes exceeds logical_decoding_work_mem. There was an assumptionin the code that by evicting the largest (sub)transaction we will comeunder the memory limit as the selected transaction will be at least aslarge as the most recent change (which caused us to go over the memorylimit). However, that is not true because a user can reduce thelogical_decoding_work_mem to a smaller value before the most recentchange.We fix it by allowing to evict the transactions until we reach under thememory limit.Reported-by: Fujii MasaoAuthor: Amit KapilaReviewed-by: Fujii MasaoBackpatch-through: 13, where it was introducedDiscussion:https://postgr.es/m/2b7ba291-22e0-a187-d167-9e5309a3458d@oss.nttdata.com1 parent350f477 commitc5c000b
1 file changed
+29
-25
lines changedLines changed: 29 additions & 25 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2359 | 2359 |
| |
2360 | 2360 |
| |
2361 | 2361 |
| |
2362 |
| - | |
| 2362 | + | |
| 2363 | + | |
2363 | 2364 |
| |
2364 |
| - | |
2365 |
| - | |
2366 |
| - | |
2367 |
| - | |
| 2365 | + | |
| 2366 | + | |
| 2367 | + | |
| 2368 | + | |
2368 | 2369 |
| |
2369 | 2370 |
| |
2370 | 2371 |
| |
| |||
2376 | 2377 |
| |
2377 | 2378 |
| |
2378 | 2379 |
| |
2379 |
| - | |
2380 |
| - | |
| 2380 | + | |
| 2381 | + | |
| 2382 | + | |
| 2383 | + | |
| 2384 | + | |
| 2385 | + | |
| 2386 | + | |
2381 | 2387 |
| |
2382 |
| - | |
| 2388 | + | |
| 2389 | + | |
| 2390 | + | |
| 2391 | + | |
| 2392 | + | |
| 2393 | + | |
| 2394 | + | |
2383 | 2395 |
| |
2384 |
| - | |
| 2396 | + | |
2385 | 2397 |
| |
2386 |
| - | |
2387 |
| - | |
2388 |
| - | |
2389 |
| - | |
2390 |
| - | |
2391 |
| - | |
| 2398 | + | |
| 2399 | + | |
| 2400 | + | |
| 2401 | + | |
| 2402 | + | |
| 2403 | + | |
| 2404 | + | |
2392 | 2405 |
| |
2393 |
| - | |
2394 |
| - | |
2395 |
| - | |
2396 |
| - | |
2397 |
| - | |
2398 |
| - | |
2399 |
| - | |
2400 |
| - | |
2401 |
| - | |
2402 |
| - | |
| 2406 | + | |
2403 | 2407 |
| |
2404 | 2408 |
| |
2405 | 2409 |
| |
|
0 commit comments
Comments
(0)