Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: [BUGS] BUG #14243: pg_basebackup failes by a STATUS_DELETE_PENDING file

0 views
Skip to first unread message

TAKATSUKA Haruka

unread,
Aug 3, 2016, 1:19:26 AM8/3/16
to

I study this a little more, but I cannot find the way to distinguish
STATUS_DELETE_PENDING state from the other state that causes permission
denied error.

Cmd.exe's "dir /q" may distinguish these, but I cannot know which API
is used.


-----------------
Haruka Takatsuka
har...@sraoss.co.jp


On Wed, 13 Jul 2016 10:10:37 +0900
Michael Paquier <michael...@gmail.com> wrote:

> On Wed, Jul 13, 2016 at 10:06 AM, Michael Paquier
> <michael...@gmail.com> wrote:
> > Checking directly for STATUS_DELETE_PENDING would be the way to go,
> > likely with tweaks in basebackup.c. but like Takatsuka-san, I cannot
> > find anything around that would allow us to check for that.
> >
> > [1]: http://stackoverflow.com/questions/6680491/why-does-windows-return-error-access-denied-when-i-try-to-open-a-delete-pended-f
>
> Actually we may want to tweak stat() to not complain for a file with
> such a state.
> --
> Michael



--
Sent via pgsql-bugs mailing list (pgsql...@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Tatsuo Ishii

unread,
Aug 3, 2016, 1:33:56 AM8/3/16
to
[Sorry for hanging to wrong message but I cannot get any email from
the list since this morning and I have to create a email from the
archive (posting is ok using the same email account. See my From:).]

Since no one came up with any useful solution for this soon, I think
I need to add this to the TODO list unless there's an objection.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp

> I study this a little more, but I cannot find the way to distinguish
> STATUS_DELETE_PENDING state from the other state that causes permission
> denied error.
>
> Cmd.exe's "dir /q" may distinguish these, but I cannot know which API
> is used.
>
>
> -----------------
> Haruka Takatsuka
> harukat(at)sraoss(dot)co(dot)jp

Michael Paquier

unread,
Aug 3, 2016, 2:16:29 AM8/3/16
to
On Wed, Aug 3, 2016 at 2:33 PM, Tatsuo Ishii <is...@postgresql.org> wrote:
> [Sorry for hanging to wrong message but I cannot get any email from
> the list since this morning and I have to create a email from the
> archive (posting is ok using the same email account. See my From:).]
>
> Since no one came up with any useful solution for this soon, I think
> I need to add this to the TODO list unless there's an objection.

The last time I looked for for a way to make the difference between a
permission error and a pending deletion status, I bumped into the
following tool PendMove:
https://technet.microsoft.com/en-us/sysinternals/bb897556.aspx

Well, it is not useful in itself, but, as my colleague Nikhil
Deshpande has pointed out, it becomes more interesting if combined
with ProcessExplorer to see what system calls it does:
https://technet.microsoft.com/en-us/sysinternals/processexplorer.aspx
This may allow us to find a way what are the system APIs called to
make the difference and then use them.

I don't make a priority of this item, but, Takatsuka-san, that's an
idea to dig for I think.
0 new messages