Re: Improve cleaning files on Postgres crashes

Поиск
Список
Период
Сортировка
Искать
От
Ranier Vilela
Тема
Re: Improve cleaning files on Postgres crashes
Дата
Msg-id
CAEudQArC5S6Sy4+Qs_87v3LpDd9ebwLB36zBwB+0r+TiO2hsvg@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Re: Improve cleaning files on Postgres crashes Tom Lane <tgl@sss.pgh.pa.us>
Re: Improve cleaning files on Postgres crashes Ranier Vilela <ranier.vf@gmail.com>
Re: Improve cleaning files on Postgres crashes Ranier Vilela <ranier.vf@gmail.com>
Re: Improve cleaning files on Postgres crashes Ranier Vilela <ranier.vf@gmail.com>

Em ter., 18 de fev. de 2025 13:21, Tom Lane <tgl@sss.pgh.pa.us> escreveu:
Ranier Vilela <ranier.vf@gmail.com> writes:
> There are some reports that Postgres does not handle correctly cleaning the
> files used when it crashes. [1]
> I think that function *fcloseall* can help a little bit.
> Mainly on Windows.
Thanks for answear Tom.

I doubt that this is a good thing to try to do during a panic exit.
In the first place, we don't know to what extent the process's
internal data structures may be corrupted, possibly causing
fcloseall itself to malfunction. 
Well, I put after fflush(NULL), so if data structures are corrupted, fflush will fail in any way.

In the second place, we might
wish to have a look at those temp files for debugging purposes.
On dev/debug are great, but on production, where disk spaces cost money, I think that a good idea.

Maybe guarded by ifdefs?

Best regards,
Ranier Vilela 
В списке pgsql-hackers по дате отправления
От: Robert Haas
Дата:
От: Tom Lane
Дата:
FAQ