Postgres is using access() function in GetNewRelFileNumber to check if assigned relfilenumber is not used for any other relation. This check will not work in Neon, because we do not have all files in local storage.
Use smgrexists() instead which will check at page server if such relfilenode is used.
Postgres is using
access()
function inGetNewRelFileNumber
to check if assigned relfilenumber is not used for any other relation. This check will not work in Neon, because we do not have all files in local storage. Use smgrexists() instead which will check at page server if such relfilenode is used.