FileUnlink is broken, but it's dead code anyway
FileUnlink is broken, but it's dead code anyway
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
I just noticed that storage/file/fd.c's FileUnlink() is not referenced anywhere, and apparently hasn't been since 7.4. This is a good thing because it doesn't work very well anymore: it's implemented by setting the FD_TEMPORARY flag and then calling FileClose(), and the recent patch to log sizes of temp files will be fooled into logging the size of the removed file, whether it was really temp or not. While we could fix this by splitting FD_TEMPORARY into two flags, it seems a bit pointless when the function isn't being used. Any votes against just removing FileUnlink()? regards, tom lane