neondatabase / postgres

PostgreSQL in Neon
https://neon.tech/docs/reference/compatibility
27 stars 12 forks source link

Use smgrexists() instead of access() to enforce uniqueness of generated relfilenumber #439

Closed knizhnik closed 3 months ago

knizhnik commented 5 months ago

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.