bgwriter holds onto file handles of deleted files

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема bgwriter holds onto file handles of deleted files
Дата
Msg-id CAMkU=1z=VZtcy+4GqHyUn7yo_7id+Lo4XDdzYYz3WBD_Zfw2DA@mail.gmail.com
обсуждение исходный текст
Ответы Re: bgwriter holds onto file handles of deleted files  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-hackers
On an overnight test run, I ran into an unexpected "out of space" condition.

The writer process was holding on to dozens of file descriptors for
long-ago deleted files from dropped tables and indexes, preventing
their disk space from being freed for reuse.

I think the checkpoint writer process learns about deleted files from
the "absorb fsync" mechanism and promptly closes those handles.  But
since the bgwriter process was split from the checkpoint writer, the
bgwriter no longer benefits from this mechanism.

It looks like it hold the file handles until either is it is killed
and restarted, or until they get flushed out of vfd cache (which holds
~1000 files on my machine, so that can be a long time and lot of disk
space).

I don't know if this is a bug exactly, but it seems pretty unfortunate.

Cheers,

Jeff


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

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: Re: Collect frequency statistics for arrays
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: random_page_cost vs seq_page_cost