Re: Error handling (or lack of it) in RemovePgTempFilesInDir

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Error handling (or lack of it) in RemovePgTempFilesInDir
Дата
Msg-id 25332.1512441513@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Error handling (or lack of it) in RemovePgTempFilesInDir  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
Michael Paquier <michael.paquier@gmail.com> writes:
> On Tue, Dec 5, 2017 at 11:15 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> The general theory I'm operating on is that we should endeavor to
>> let the database start in any situation where that doesn't involve
>> a data-corruption hazard.  Yeah, it might not be nice if we leave
>> GB worth of temp files around, but is a postmaster start failure
>> better?  I don't think so.

> I am getting the feeling that we are going to see people complain
> about those files lying around as well... That's as far as my opinion
> goes.

Perhaps, but surely it's inconsistent to consider that opendir()
failure is fatal while failing to unlink individual temp files
found by the directory scan is not.  As an example, a pretty likely
scenario is that somehow a temp directory has been made unwritable
by the postmaster.  The old coding would have let that pass without
even a bleat in the postmaster log; but it results in just the same
amount of disk space leakage as ignoring the temp directory because
we couldn't opendir() it.

            regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] pow support for pgbench
Следующее
От: Greg Stark
Дата:
Сообщение: Re: ExplainOneQuery_hook ignored for EXPLAIN EXECUTE