Re: O(n) tasks cause lengthy startups and checkpoints
От | Tom Lane |
---|---|
Тема | Re: O(n) tasks cause lengthy startups and checkpoints |
Дата | |
Msg-id | 1058306.1680467858@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: O(n) tasks cause lengthy startups and checkpoints (Nathan Bossart <nathandbossart@gmail.com>) |
Ответы |
Re: O(n) tasks cause lengthy startups and checkpoints
|
Список | pgsql-hackers |
Nathan Bossart <nathandbossart@gmail.com> writes: > It's been a little while since I dug into this, but I do see your point > that the wraparound risk could be higher in some cases. For example, if > you have a billion temp files to clean up, the custodian could be stuck on > that task for a long time. I will give this some further thought. I'm all > ears if anyone has ideas about how to reduce this risk. I wonder if a single long-lived custodian task is the right model at all. At least for RemovePgTempFiles, it'd make more sense to write it as a background worker that spawns, does its work, and then exits, independently of anything else. Of course, then you need some mechanism for ensuring that a bgworker slot is available when needed, but that doesn't seem horridly difficult --- we could have a few "reserved bgworker" slots, perhaps. An idle bgworker slot doesn't cost much. regards, tom lane
В списке pgsql-hackers по дате отправления: