forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc0386f4
committed
Release memory allocated by dependency_degree
Calculating degree of a functional dependency may allocate a lot ofmemory - we have released mot of the explicitly allocated memory, bute.g. detoasted varlena values were left behind. That may be an issue,because we consider a lot of dependencies (all combinations), and thedetoasting may happen for each one again.Fixed by calling dependency_degree() in a dedicated context, andresetting it after each call. We only need the calculated dependencydegree, so we don't need to copy anything.Backpatch to PostgreSQL 10, where extended statistics were introduced.Backpatch-through: 10Discussion:https://www.postgresql.org/message-id/20210915200928.GP831%40telsasoft.com1 parentb564eb0 commitc0386f4
1 file changed
+16
-7
lines changedLines changed: 16 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
30 | 30 |
| |
31 | 31 |
| |
32 | 32 |
| |
| 33 | + | |
33 | 34 |
| |
34 | 35 |
| |
35 | 36 |
| |
| |||
332 | 333 |
| |
333 | 334 |
| |
334 | 335 |
| |
335 |
| - | |
336 |
| - | |
337 |
| - | |
338 |
| - | |
339 |
| - | |
340 |
| - | |
341 |
| - | |
342 | 336 |
| |
343 | 337 |
| |
344 | 338 |
| |
| |||
370 | 364 |
| |
371 | 365 |
| |
372 | 366 |
| |
| 367 | + | |
373 | 368 |
| |
374 | 369 |
| |
375 | 370 |
| |
| |||
378 | 373 |
| |
379 | 374 |
| |
380 | 375 |
| |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
381 | 381 |
| |
382 | 382 |
| |
383 | 383 |
| |
| |||
396 | 396 |
| |
397 | 397 |
| |
398 | 398 |
| |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
399 | 403 |
| |
400 | 404 |
| |
401 | 405 |
| |
402 | 406 |
| |
| 407 | + | |
| 408 | + | |
| 409 | + | |
403 | 410 |
| |
404 | 411 |
| |
405 | 412 |
| |
| |||
441 | 448 |
| |
442 | 449 |
| |
443 | 450 |
| |
| 451 | + | |
| 452 | + | |
444 | 453 |
| |
445 | 454 |
| |
446 | 455 |
| |
|
0 commit comments
Comments
(0)