Skip site navigation (1) Skip section navigation (2)

Re: WAL "low watermark" during base backup

From: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WAL "low watermark" during base backup
Date: 2011-09-03 21:03:16
Message-ID: m2zkile3u3.fsf@2ndQuadrant.fr (view raw or flat)
Thread:
Lists: pgsql-hackers
Magnus Hagander <magnus(at)hagander(dot)net> writes:

> Attached patch implements a "low watermark wal location" in the
> walsender shmem array. Setting this value in a walsender prevents
> transaction log removal prior to this point - similar to how
> wal_keep_segments work, except with an absolute number rather than

Cool.  The first use case that comes to my mind is when to clean old WAL
files when using multiple standby servers.  Will it help here?

> relative. For now, this is set when running a base backup with WAL
> included - to prevent the required WAL to be recycled away while the
> backup is running, without having to guestimate the value for
> wal_keep_segments.

I would have guessed that if you stream WALs in parallel of the backup,
and begin streaming before you pg_start_backup(), you don't need
anything more.  Is that wrong?

Regards,
-- 
Dimitri Fontaine
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support

In response to

pgsql-hackers by date

Next:From: Andrew DunstanDate: 2011-09-03 21:04:42
Subject: Re: pg_restore --no-post-data and --post-data-only
Previous:From: Dimitri FontaineDate: 2011-09-03 20:49:51
Subject: Re: pg_restore --no-post-data and --post-data-only

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group