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

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).