neondatabase / postgres

PostgreSQL in Neon
https://neon.tech/docs/reference/compatibility
Other
26 stars 11 forks source link

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

Closed knizhnik closed 1 month ago

knizhnik commented 3 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.