Check for overflow in filename generation
The filename is defined as MAXPGPATH which can overflow on macOS when 64 bit inodes are used, since the dirent struct can hold 1023 character dir entries (Linux has a dirent64 struct instead of over- loading dirent). Guard against possible overflow and ereport a WARNING in case it happens. While perhaps not technically required on other platforms it's good practice to check for overflow either way so avoid ifdefing for only macOS.
Showing
想要评论请 注册 或 登录