Re: BUG #14243: pg_basebackup failes by a STATUS_DELETE_PENDING file - Mailing list pgsql-bugs

From Alvaro Herrera
Subject Re: BUG #14243: pg_basebackup failes by a STATUS_DELETE_PENDING file
Date
Msg-id 20160712225404.GA892041@alvherre.pgsql
Whole thread Raw
In response to Re: BUG #14243: pg_basebackup failes by a STATUS_DELETE_PENDING file  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: BUG #14243: pg_basebackup failes by a STATUS_DELETE_PENDING file
List pgsql-bugs
Amit Kapila wrote:
> On Tue, Jul 12, 2016 at 2:02 PM,  <harukat@sraoss.co.jp> wrote:

> > C:\Program Files\PostgreSQL\9.6\data\base\16393>dir /q 16444
> >
> >  C:\Program Files\PostgreSQL\9.6\data\base\16393 directory
> >
> >  2016/07/12  15:56             0 ...        16444
> >
> > Dir command says the file 16444's owner is '...'.
> > It means file 16444 is in STATUS_DELETE_PENDING.

> pg_basebackup tries to backup all the files in data directory and
> tablespaces.  Refer Notes section of pg_basebackup documentation.  I
> think if it decides to skip a file with some bad status, it might also
> lead to a corrupt backup.  I wonder how the file has such a status?
> From the name, it looks to be a valid database file.

This file is probably being deleted by a checkpoint after some user
transaction marked it for removal (either because the relation was
dropped, or because it got a new relfilenode).  I would say that the
file is not needed for the backup after all and pg_basebackup should
just ignore it.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #14245: Segfault on weird to_tsquery
Next
From: Tom Lane
Date:
Subject: Re: BUG #14243: pg_basebackup failes by a STATUS_DELETE_PENDING file