Re: File leak?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: File leak?
Дата
Msg-id 11898.1087170442@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: File leak?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: File leak?  (Heikki Linnakangas <hlinnaka@iki.fi>)
Список pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: File leak?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [PATCHES] Configuration patch