From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: File leak? |
Date: | 2004-06-13 23:47:22 |
Message-ID: | 11898.1087170442@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> 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 transaction completes, right, or are you thinking we would do a
> special fsync when we add the record?
Right, we would have to XLogFlush the file-creation WAL record before we
could actually create the file. This is in line with the standard WAL
rule: the WAL record must hit disk before the data file change it
describes does. Assuming that the filesystem fsync's the created inode
immediately, that means we have to flush first.
I'm not sure what the performance implications of this would be; it's
likely that pushing the cost somewhere else would be better.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2004-06-13 23:55:39 | Re: [PATCHES] Configuration patch |
Previous Message | Bruce Momjian | 2004-06-13 23:43:20 | Re: File leak? |