Re: [HACKERS] File leak?

2004-06-14 Thread Heikki Linnakangas
On Sun, 13 Jun 2004, Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: (viz, log at the instant of file creation, and the replayer would have to keep track of whether it sees the creating transaction commit and delete the file if not). I don't see how we could WAL log it because

Re: [HACKERS] File leak?

2004-06-14 Thread Tom Lane
Heikki Linnakangas [EMAIL PROTECTED] writes: I'm afraid that's not enough. Checkpoints spoil it, think: 1. CREATE TABLE foobar ... 2. INSERT 3. checkpoint 4. crash The replay would not see the file-creation WAL record. Good point. That makes it messy enough that we probably don't

Re: [HACKERS] File leak?

2004-06-14 Thread Gaetano Mendola
Bruce Momjian wrote: Tom Lane wrote: Now that I think about it, I believe Bruce recently removed this on my advice; I was thinking that the problem shouldn't occur anymore now that True. we WAL-log file creation and deletion. But actually the present form of the WAL entries doesn't ensure that

Re: [HACKERS] File leak?

2004-06-13 Thread Heikki Linnakangas
On Sat, 12 Jun 2004, Tom Lane wrote: Heikki Linnakangas [EMAIL PROTECTED] writes: I wonder if we could clean up those lost files on database recovery or vacuum. There is a TODO for this, but it seems exceedingly low priority to me. Are you sure? I read through the TODO list but couldn't

Re: [HACKERS] File leak?

2004-06-13 Thread Tom Lane
Heikki Linnakangas [EMAIL PROTECTED] writes: On Sat, 12 Jun 2004, Tom Lane wrote: Heikki Linnakangas [EMAIL PROTECTED] writes: I wonder if we could clean up those lost files on database recovery or vacuum. There is a TODO for this, but it seems exceedingly low priority to me. Are you

Re: [HACKERS] File leak?

2004-06-13 Thread Bruce Momjian
Tom Lane wrote: Heikki Linnakangas [EMAIL PROTECTED] writes: On Sat, 12 Jun 2004, Tom Lane wrote: Heikki Linnakangas [EMAIL PROTECTED] writes: I wonder if we could clean up those lost files on database recovery or vacuum. There is a TODO for this, but it seems exceedingly low

Re: [HACKERS] File leak?

2004-06-13 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: (viz, log at the instant of file creation, and the replayer would have to keep track of whether it sees the creating transaction commit and delete the file if not). I don't see how we could WAL log it because we don't fsync the WAL until our

Re: [HACKERS] File leak?

2004-06-12 Thread Tom Lane
Heikki Linnakangas [EMAIL PROTECTED] writes: I wonder if we could clean up those lost files on database recovery or vacuum. There is a TODO for this, but it seems exceedingly low priority to me. In any case I'd not recommend troubling to work on the problem until the tablespaces merry-go-round

Re: [HACKERS] File leak?

2004-06-12 Thread Bruce Momjian
Tom Lane wrote: Heikki Linnakangas [EMAIL PROTECTED] writes: I wonder if we could clean up those lost files on database recovery or vacuum. There is a TODO for this, but it seems exceedingly low priority to me. In any case I'd not recommend troubling to work on the problem until the