Re: WAL "low watermark" during base backup - Mailing list pgsql-hackers

From Dimitri Fontaine
Subject Re: WAL "low watermark" during base backup
Date
Msg-id m2zkile3u3.fsf@2ndQuadrant.fr
Whole thread Raw
In response to WAL "low watermark" during base backup  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers
Magnus Hagander <magnus@hagander.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


pgsql-hackers by date:

Previous
From: Dimitri Fontaine
Date:
Subject: Re: pg_restore --no-post-data and --post-data-only
Next
From: Andrew Dunstan
Date:
Subject: Re: pg_restore --no-post-data and --post-data-only