walkdir does not honor elevel because of call to AllocateDir,possibly causing issues in abort handler

Поиск
Список
Период
Сортировка
От Jelte Fennema
Тема walkdir does not honor elevel because of call to AllocateDir,possibly causing issues in abort handler
Дата
Msg-id HE1PR83MB0218D385BCA08C32F0B10163F7830@HE1PR83MB0218.EURPRD83.prod.outlook.com
обсуждение исходный текст
Список pgsql-hackers
walkdir is used indirectly in the abort handler of SharedFileSetOnDetach, which has the following comment:

/*
* Callback function that will be invoked when this backend detaches from a
* DSM segment holding a SharedFileSet that it has created or attached to. If
* we are the last to detach, then try to remove the directories and
* everything in them. We can't raise an error on failures, because this runs
* in error cleanup paths.
*/

walkdir itself has elevel, which is set to LOG in that case, so it should ot throw an ERROR.

The fix seems simple enough: AllocateDir and reserveAllocatedDesc should take an elevel argument and honor that. To not change the signature of AllocateDir and possibly break extions, it could simply become a wrapper of a new function like AllocateDirWithElevel(dirname, ERROR).

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

Предыдущее
От: Odin Ugedal
Дата:
Сообщение: Re: [PATCH] Add support for choosing huge page size
Следующее
От: Amit Khandekar
Дата:
Сообщение: Re: Auto-vectorization speeds up multiplication of large-precision numerics