From: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | geek+(at)cmu(dot)edu |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] Re: Nasty resource-leak problem in sort code] |
Date: | 1999-05-07 23:03:35 |
Message-ID: | 199905072303.TAA14305@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Lockhart | 1999-05-08 02:47:58 | Re: [HACKERS] NUMERIC type conversions leave much to be desired |
Previous Message | Bruce Momjian | 1999-05-07 23:01:45 | Re: [HACKERS] Re: Nasty resource-leak problem in sort code |