Re: BUG #14243: pg_basebackup failes by a STATUS_DELETE_PENDING file
Michael Paquier <michael.paquier@gmail.com>
From: Michael Paquier <michael.paquier@gmail.com>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Magnus Hagander <magnus@hagander.net>, Tom Lane <tgl@sss.pgh.pa.us>, Amit Kapila <amit.kapila16@gmail.com>,
TAKATSUKA Haruka <harukat@sraoss.co.jp>, PostgreSQL Bugs <pgsql-bugs@postgresql.org>
Date: 2016-10-06T06:31:30Z
Lists: pgsql-bugs
On Thu, Oct 6, 2016 at 2:20 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:
> I have been digging around that, but could not find out any options
> that would delay the file deletion after it has been requested. As
> pg_basebackup grabs automatically all the files in PGDATA, I have as
> well tried to use thousands of dummy files up to 1MB, as well as huge
> files ("fsutil file createnew" is your friend), deleting them manually
> to force the stat() calls to be unhappy be still I could not reproduce
> it... If somebody has better ideas I am open.
Extra idea: patch win32_safestat() so as it continues to call stat()
in an infinite loop for a specific file that I manually created in
base/$DBOID until it fails with res < 0. Even that did not bump into
ERROR_DELETE_PENDING :)
--
Michael