Re: Deleting old WAL-files

From: Jan Lentfer <Jan(dot)Lentfer(at)web(dot)de>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Deleting old WAL-files
Date: 2015-05-19 11:52:39
Message-ID: 12819ff9dc22928bdb69e5de36b62338@imap.lan.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Am 2015-05-19 13:43, schrieb Gustav Karlsson:
> Is there a good way of finding the oldest WAL-segment needed for a
> given basebackup? (If not, what is the typical method for deleting
> old
> WAL-segments?)
>
>
> (We are aware that Barman is offering this functionality, and might
> migrate to using it, but would still like to know the method used)

In short terms you need all the WAL segments created during and after
the base backup. It's also explained in the manual:

To make use of the backup, you will need to keep all the WAL segment
files generated during and after the file system backup. To aid you in
doing this, the base backup process creates a backup history file that
is immediately stored into the WAL archive area. This file is named
after the first WAL segment file that you need for the file system
backup. For example, if the starting WAL file is
0000000100001234000055CD the backup history file will be named something
like 0000000100001234000055CD.007C9330.backup

From:
http://www.postgresql.org/docs/9.4/interactive/continuous-archiving.html#BACKUP-BASE-BACKUP

hth

Jan

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Albe Laurenz 2015-05-19 12:09:17 Re: Deleting old WAL-files
Previous Message Magnus Hagander 2015-05-19 11:51:21 Re: Deleting old WAL-files