Re: Sort memory not being released
От | Tom Lane |
---|---|
Тема | Re: Sort memory not being released |
Дата | |
Msg-id | 15659.1055885916@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Sort memory not being released ("Jim C. Nasby" <jim@nasby.net>) |
Ответы |
Re: Sort memory not being released
|
Список | pgsql-general |
"Jim C. Nasby" <jim@nasby.net> writes: > Of course I wasn't planning on sucking down a bunch of memory and > holding on to it. :) Sure. But when you're done with the big sort, just start a fresh session. I don't see that this is worth agonizing over. > If sort_mem is over X size, then use only Y for pre-buffering (How much > does a large sort_mem help if you have to spill to disk?) It still helps quite a lot, because the average initial run length is (if I recall Knuth correctly) twice the working buffer size. I can't see a reason for cutting back usage once you've been forced to start spilling. The bigger problem with your discussion is the assumption that we can find out "if the OS is running low on free physical memory". That seems (a) unportable and (b) a moving target. regards, tom lane
В списке pgsql-general по дате отправления: