Re: [HACKERS] Re: Nasty resource-leak problem in sort code]
От | Bruce Momjian |
---|---|
Тема | Re: [HACKERS] Re: Nasty resource-leak problem in sort code] |
Дата | |
Msg-id | 199905072303.TAA14305@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: [HACKERS] Re: Nasty resource-leak problem in sort code (geek+@cmu.edu) |
Список | pgsql-hackers |
> Uhm, this all seems unnecessarily complicated. Shouldn't the process > look more like this: > fp = open('tempfile'); > unlink('tempfile'); > > This way, when the file is closed, the space is freed. The only > complication I can see is if backends need to share the file handle, > or it needs to be re-opened. This works with all sorts of temp-file > situations. > > Of course, it's not NT safe, since I don't believe that NT provides > for deleting open files (NT file libs sucks. Two problems. First, we support NT, so we have to behave a little bit to keep it happy. Second, Tom is concerned about leaking file handles, not just the files themselves. He needs to call close() to release them on transaction aborts. -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026
В списке pgsql-hackers по дате отправления: