Re: WAL files backup

From: "Chad Wagner" <chad(dot)wagner(at)gmail(dot)com>
To: "Andy Shellam (Mailing Lists)" <andy(dot)shellam-lists(at)mailnetwork(dot)co(dot)uk>
Cc: "Eduardo J(dot) Ortega" <ejortegau(at)cable(dot)net(dot)co>, pgsql-admin(at)postgresql(dot)org
Subject: Re: WAL files backup
Date: 2007-02-16 22:32:28
Message-ID: 81961ff50702161432v5e77a806odc7b5143d7f8113f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On 2/16/07, Andy Shellam (Mailing Lists) <
andy(dot)shellam-lists(at)mailnetwork(dot)co(dot)uk> wrote:
>
>
> Why bother trying to delete WAL files older than the .backup file? When
> PostgreSQL is in recovery mode it knows which WAL files are necessary to
> perform the recovery.
>
> Also, the documentation recommends excluding the pg_xlog directory when
> performing the base backup. Likely when it comes time to recovery the
> online WAL files have been archived already, so it is a risk of confusion I
> am sure.
>
>
> If the OP is doing the same as myself, the WAL files are being archived
> outside of pg_xlog (indeed outside of the PG data cluster) - it makes no
> sense keeping around WAL files older than the .backup file because they're
> not needed - in a day I generate ~5GB worth of WAL files which aren't needed
> after the full backup runs at 2am, so it's a waste of resources to keep them
> around or to worry about backing them up after this time.
>

I mentioned this in my other response, the only reason I ask is because of
the potential need to recover from an earlier base backup up to a specific
point -- perhaps before the most recent base backup. Personally I don't
think it is a good idea for every environment to do this, but I can see the
value in it and if you truly feel it is unnecessary then I can certainly
respect that. Perhaps I am a bit too paranoid :), but I have seen people
foolishly do a huge cleanup and then take a backup and realize "Oh crap, I
did too much!" -- and if you don't have all the WAL files you certainly
can't guarantee a specific PITR.

--
Chad
http://www.postgresqlforums.com/

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Benjamin Arai 2007-02-16 22:34:58 Re: Priorities for users or queries?
Previous Message Henry, Nigel, CYFD 2007-02-16 22:30:02 Re: Isolated databases or instances