Re: readdir is incorrectly implemented at Windows

2019-03-03 Thread Michael Paquier
On Fri, Mar 01, 2019 at 04:43:13PM +0900, Michael Paquier wrote: > Thanks for confirming, Konstantin. Let's wait a couple of days to see > if anybody has objections or comments, and I'll try to commit this > patch. Done and backpatched down to 9.4, with Andrew's suggestion from upthread

Re: readdir is incorrectly implemented at Windows

2019-03-01 Thread Andrew Dunstan
On 2/25/19 10:38 AM, Konstantin Knizhnik wrote: > Hi hackers, > > Small issue with readir implementation for Windows. > Right now it returns ENOENT in case of any error returned by > FindFirstFile. > So all places in Postgres where opendir/listdir are used will assume > that directory is empty

Re: readdir is incorrectly implemented at Windows

2019-02-28 Thread Michael Paquier
On Fri, Mar 01, 2019 at 10:23:02AM +0300, Konstantin Knizhnik wrote: > Yes, Yuri Kurenkov and Grigory Smalking did a lot in investigation > of this problem. > (the irony is that the problem detected by Yuri was caused by > another bug in pg_probackup, but we thought that it was related with >

Re: readdir is incorrectly implemented at Windows

2019-02-28 Thread Konstantin Knizhnik
On 01.03.2019 9:13, Michael Paquier wrote: On Thu, Feb 28, 2019 at 11:15:53AM +0900, Michael Paquier wrote: Could you add it to the next commit fest as a bug fix please? I think that I will be able to look at that in details soon, but if not it would be better to not lose track of your fix.

Re: readdir is incorrectly implemented at Windows

2019-02-28 Thread Michael Paquier
On Thu, Feb 28, 2019 at 11:15:53AM +0900, Michael Paquier wrote: > Could you add it to the next commit fest as a bug fix please? I think > that I will be able to look at that in details soon, but if not it > would be better to not lose track of your fix. Okay, I have looked at your patch. And

Re: readdir is incorrectly implemented at Windows

2019-02-27 Thread Michael Paquier
On Mon, Feb 25, 2019 at 06:38:16PM +0300, Konstantin Knizhnik wrote: > Small issue with readir implementation for Windows. > Right now it returns ENOENT in case of any error returned by FindFirstFile. > So all places in Postgres where opendir/listdir are used will assume that > directory is empty

Re: readdir is incorrectly implemented at Windows

2019-02-27 Thread Grigory Smolkin
Originally bug was reported by Yuri Kurenkov: https://github.com/postgrespro/pg_probackup/issues/48 As pg_probackup rely on readdir() for listing files to backup, wrong permissions could lead to a broken backup. On 02/25/2019 06:38 PM, Konstantin Knizhnik wrote: Hi hackers, Small issue with