Re: [HACKERS] Should *.backup files ever be removed from pg_xlog? - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: [HACKERS] Should *.backup files ever be removed from pg_xlog?
Date
Msg-id 200506090416.j594GFU06425@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] Should *.backup files ever be removed from pg_xlog?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] Should *.backup files ever be removed from pg_xlog?
List pgsql-patches
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > I have fixed the code to properly remove *.backup files from the
> > /pg_xlog directory once they are archived.
>
> I do not actually think that this is a good idea.  The .backup files are
> not large and they are pretty critical info --- so having multiple
> copies of them seems like a good idea.  We don't auto-remove timeline
> history files either, for the same reason.

I realize the files are small, but the number of entries in the
directory might get pretty large.  I am also worried about folks
realizing we are not cleaning out those directories and mucking in there
when they shouldn't --- I already got a private email asking why there
are so many files in there and can they be cleared out.  In fact, the
archive_status/ directory also keeps *.done files for the backup files.

We knowe we have archived the *.backup files.  Are these files any use
if we can't get the archive files restored?

OK, how about if we do this cleanup when we do pg_stop_backup() so we
delete any previous *.backup files, rather than do it as part of
checkpoint.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Should *.backup files ever be removed from pg_xlog?
Next
From: Neil Conway
Date:
Subject: Re: final light versions of Oracle compatibility (SQLSTATE, GREATEST,