Check for overflow in filename generation
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.

rvs/gpdb,edespino/gpdb,xinzweb/gpdb,jmcatamney/gpdb,Chibin/gpdb,lintzc/gpdb,adam8157/gpdb,adam8157/gpdb,Quikling/gpdb,xinzweb/gpdb,ashwinstar/gpdb,rvs/gpdb,Quikling/gpdb,janebeckman/gpdb,Quikling/gpdb,edespino/gpdb,rvs/gpdb,50wu/gpdb,adam8157/gpdb,rvs/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,xinzweb/gpdb,janebeckman/gpdb,Quikling/gpdb,lintzc/gpdb,cjcjameson/gpdb,cjcjameson/gpdb,Chibin/gpdb,lisakowen/gpdb,jmcatamney/gpdb,50wu/gpdb,greenplum-db/gpdb,edespino/gpdb,rvs/gpdb,lisakowen/gpdb,adam8157/gpdb,jmcatamney/gpdb,yuanzhao/gpdb,edespino/gpdb,lisakowen/gpdb,kaknikhil/gpdb,Quikling/gpdb,lisakowen/gpdb,jmcatamney/gpdb,janebeckman/gpdb,cjcjameson/gpdb,janebeckman/gpdb,lisakowen/gpdb,ashwinstar/gpdb,lintzc/gpdb,edespino/gpdb,yuanzhao/gpdb,adam8157/gpdb,cjcjameson/gpdb,rvs/gpdb,xinzweb/gpdb,lintzc/gpdb,ashwinstar/gpdb,xinzweb/gpdb,50wu/gpdb,Chibin/gpdb,janebeckman/gpdb,cjcjameson/gpdb,greenplum-db/gpdb,Quikling/gpdb,kaknikhil/gpdb,Chibin/gpdb,lintzc/gpdb,yuanzhao/gpdb,yuanzhao/gpdb,Quikling/gpdb,edespino/gpdb,adam8157/gpdb,kaknikhil/gpdb,ashwinstar/gpdb,lisakowen/gpdb,jmcatamney/gpdb,xinzweb/gpdb,rvs/gpdb,lisakowen/gpdb,lintzc/gpdb,greenplum-db/gpdb,50wu/gpdb,kaknikhil/gpdb,yuanzhao/gpdb,Chibin/gpdb,cjcjameson/gpdb,yuanzhao/gpdb,ashwinstar/gpdb,lintzc/gpdb,Chibin/gpdb,50wu/gpdb,jmcatamney/gpdb,ashwinstar/gpdb,edespino/gpdb,greenplum-db/gpdb,yuanzhao/gpdb,cjcjameson/gpdb,Chibin/gpdb,lintzc/gpdb,adam8157/gpdb,jmcatamney/gpdb,janebeckman/gpdb,janebeckman/gpdb,Quikling/gpdb,edespino/gpdb,greenplum-db/gpdb,Chibin/gpdb,rvs/gpdb,kaknikhil/gpdb,janebeckman/gpdb,Quikling/gpdb,janebeckman/gpdb,yuanzhao/gpdb,Chibin/gpdb,50wu/gpdb,cjcjameson/gpdb,greenplum-db/gpdb,Quikling/gpdb,lisakowen/gpdb,rvs/gpdb,yuanzhao/gpdb,kaknikhil/gpdb,edespino/gpdb,lintzc/gpdb,greenplum-db/gpdb,Chibin/gpdb,kaknikhil/gpdb,janebeckman/gpdb,50wu/gpdb,kaknikhil/gpdb,kaknikhil/gpdb,xinzweb/gpdb,ashwinstar/gpdb,cjcjameson/gpdb,greenplum-db/gpdb,kaknikhil/gpdb,50wu/gpdb,adam8157/gpdb,yuanzhao/gpdb,rvs/gpdb,cjcjameson/gpdb,edespino/gpdb,xinzweb/gpdb