From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, TAKATSUKA Haruka <harukat(at)sraoss(dot)co(dot)jp>, PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: BUG #14243: pg_basebackup failes by a STATUS_DELETE_PENDING file |
Date: | 2016-08-22 13:48:57 |
Message-ID: | CABUevEyTHVWOmvyjkDVbJbkWUObGhCTBf=1TM0soa21DdnT2RQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Mon, Aug 22, 2016 at 3:42 PM, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
wrote:
> On Mon, Aug 22, 2016 at 10:17 PM, Magnus Hagander <magnus(at)hagander(dot)net>
> wrote:
> > Not having looked in detail, but in pgwin32_safestat(), if the stat()
> call
> > fails, we return immediately without calling _dosmaperr(), don't we? So
> > we're still going to error out there with whatever the default mapping
> is,
> > and that's access denied.
> >
> > It's only if the the stat() call succeeds but the getting of extended
> > attributes fail that we actually call _dosmaperr().
>
> Meh, you're right. How stupid I am here. So we could just reuse the
> first block of your patch when checking for (r < 0), but drop the
> second part that complicates GetFileAttributesEx if win32error.c gets
> completed for _dosmaperr as my last patch does, right?
>
Yeah, that seems correct. And I agree that it's cleaner to do it in
_dosmaperr() than to do it in the individual locations.
> By the way, in your patch you really need to
> s/STATUS_DELETE_PENDING/ERROR_DELETE_PENDING or compilation just
> fails.
>
Hah. Yeah, that patch was coded-without-compiling as a poc of how to do it.
Would've definitely needed a round of testing before applying :)
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2016-08-22 14:00:34 | Re: BUG #14243: pg_basebackup failes by a STATUS_DELETE_PENDING file |
Previous Message | Michael Paquier | 2016-08-22 13:42:04 | Re: BUG #14243: pg_basebackup failes by a STATUS_DELETE_PENDING file |