Re: [PATCH] Use access() to check file existence in GetNewRelFileNode().

2018-07-08 Thread Michael Paquier
On Fri, Jul 06, 2018 at 10:52:14PM +0200, Peter Eisentraut wrote: > This patch looks sensible to me. We also use access() elsewhere in the > backend to test for file existence. Yes, the patch made sense when I looked at it, and it still does, so committed. -- Michael signature.asc Description:

Re: [PATCH] Use access() to check file existence in GetNewRelFileNode().

2018-07-06 Thread Peter Eisentraut
On 18.05.18 16:04, Michael Paquier wrote: > On Fri, May 18, 2018 at 02:42:08PM +0800, Paul Guo wrote: >> 2018-05-17 21:18 GMT+08:00 Michael Paquier : >>> You should also add this patch to the next commit fest, development of >>> v11 is done and it is a stabilization period now, so no new patches

Re: [PATCH] Use access() to check file existence in GetNewRelFileNode().

2018-05-18 Thread Michael Paquier
On Fri, May 18, 2018 at 02:42:08PM +0800, Paul Guo wrote: > 2018-05-17 21:18 GMT+08:00 Michael Paquier : >> You should also add this patch to the next commit fest, development of >> v11 is done and it is a stabilization period now, so no new patches are >> merged. Here is

Re: [PATCH] Use access() to check file existence in GetNewRelFileNode().

2018-05-18 Thread Paul Guo
2018-05-17 21:18 GMT+08:00 Michael Paquier : > On Thu, May 17, 2018 at 05:23:28PM +0800, Paul Guo wrote: > > F_OK seems to be better than R_OK because we want to check file existence > > (not read permission) before creating the relation file with the path > > later. > >

Re: [PATCH] Use access() to check file existence in GetNewRelFileNode().

2018-05-17 Thread Michael Paquier
On Thu, May 17, 2018 at 05:23:28PM +0800, Paul Guo wrote: > F_OK seems to be better than R_OK because we want to check file existence > (not read permission) before creating the relation file with the path > later. Please do not top-post, this breaks the discussion logic of the thread. Perhaps

Re: [PATCH] Use access() to check file existence in GetNewRelFileNode().

2018-05-17 Thread Paul Guo
F_OK seems to be better than R_OK because we want to check file existence (not read permission) before creating the relation file with the path later. 2018-05-17 17:09 GMT+08:00 Michael Paquier : > On Thu, May 17, 2018 at 04:09:27PM +0800, Paul Guo wrote: > > Previous code

Re: [PATCH] Use access() to check file existence in GetNewRelFileNode().

2018-05-17 Thread Michael Paquier
On Thu, May 17, 2018 at 04:09:27PM +0800, Paul Guo wrote: > Previous code uses BasicOpenFile() + close(). > > access() should be faster than BasicOpenFile()+close() and access() > should be more correct since BasicOpenFile() could fail for various > cases (e.g. due to file permission, etc) even

[PATCH] Use access() to check file existence in GetNewRelFileNode().

2018-05-17 Thread Paul Guo
Previous code uses BasicOpenFile() + close(). access() should be faster than BasicOpenFile()+close() and access() should be more correct since BasicOpenFile() could fail for various cases (e.g. due to file permission, etc) even the file exists. access() is supported on Linux/Unix. I do not have