]> granicus.if.org Git - postgresql/commit
Use access() to check file existence in GetNewRelFileNode()
authorMichael Paquier <michael@paquier.xyz>
Sun, 8 Jul 2018 09:53:20 +0000 (18:53 +0900)
committerMichael Paquier <michael@paquier.xyz>
Sun, 8 Jul 2018 09:53:20 +0000 (18:53 +0900)
commit677da8c15d19c11465d78f18bfd5ceb5d6fc3af1
tree5922d5e71afbebaa190370541bdf02c45fec1345
parent0903bbdad24a8f51b18a6a54a41bbb36ad2ceee4
Use access() to check file existence in GetNewRelFileNode()

Previous code used BasicOpenFile() and close() just to check for a file
collision, while there is no need to hold open a file descriptor but
that's an overkill here.

Author: Paul Guo
Reviewed-by: Peter Eisentraut, Michael Paquier
Discussion: https://postgr.es/m/CABQrizcUtiHaquxK=d4etBX8GF9kbZB50Nt1gO9_aN-e9SptyQ@mail.gmail.com
src/backend/catalog/catalog.c