forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitad8a166
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 parent83772cc commitad8a166
1 file changed
+16
-6
lines changedLines changed: 16 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
30 | 30 |
| |
31 | 31 |
| |
32 | 32 |
| |
| 33 | + | |
33 | 34 |
| |
34 | 35 |
| |
35 | 36 |
| |
| |||
325 | 326 |
| |
326 | 327 |
| |
327 | 328 |
| |
328 |
| - | |
329 |
| - | |
330 |
| - | |
331 |
| - | |
332 |
| - | |
333 |
| - | |
334 | 329 |
| |
335 | 330 |
| |
336 | 331 |
| |
| |||
359 | 354 |
| |
360 | 355 |
| |
361 | 356 |
| |
| 357 | + | |
362 | 358 |
| |
363 | 359 |
| |
364 | 360 |
| |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
365 | 366 |
| |
366 | 367 |
| |
367 | 368 |
| |
| |||
380 | 381 |
| |
381 | 382 |
| |
382 | 383 |
| |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
383 | 388 |
| |
384 | 389 |
| |
385 | 390 |
| |
386 | 391 |
| |
| 392 | + | |
| 393 | + | |
| 394 | + | |
387 | 395 |
| |
388 | 396 |
| |
389 | 397 |
| |
| |||
425 | 433 |
| |
426 | 434 |
| |
427 | 435 |
| |
| 436 | + | |
| 437 | + | |
428 | 438 |
| |
429 | 439 |
| |
430 | 440 |
| |
|
0 commit comments
Comments
(0)