From: | geek+(at)cmu(dot)edu |
---|---|
To: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] Re: Nasty resource-leak problem in sort code |
Date: | 1999-05-07 16:18:32 |
Message-ID: | emacs-smtp-6098-14131-4696-691968@export.andrew.cmu.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Then <tgl(at)sss(dot)pgh(dot)pa(dot)us> spoke up and said:
> After further thought it seems that adding code to release temporary
> files at transaction abort is the best solution. I propose the
> following fix:
[ explanation snipped ]
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.
--
=====================================================================
| JAVA must have been developed in the wilds of West Virginia. |
| After all, why else would it support only single inheritance?? |
=====================================================================
| Finger geek(at)cmu(dot)edu for my public key. |
=====================================================================
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 1999-05-07 16:22:27 | Re: [COMMITTERS] 'pgsql/src/backend/parser gram.c' |
Previous Message | Tom Lane | 1999-05-07 15:58:34 | Re: Nasty resource-leak problem in sort code |