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

Re: WAL "low watermark" during base backup

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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-02 18:52:25
Message-ID: (view raw, whole thread or download thread mbox)
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
> 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. (There could be other ways added to set it in the
> future, but that's the only one I've done for now)

I agree with that parenthetical remark, ie that we'll probably consider
other uses for this in future, so I'd suggest changing this one comment:

> +  * Also check if there any in-progress base backup that has set
> +  * a low watermark preventing us from removing it.

Just say "if any WAL sender has a low watermark that prevents us from
removing it".

Looks reasonably sane otherwise, modulo Jaime's comment about the
missing reset step.

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Tomas VondraDate: 2011-09-02 18:54:05
Subject: Re: PATCH: regular logging of checkpoint progress
Previous:From: Tom LaneDate: 2011-09-02 18:48:24
Subject: Re: PATCH: regular logging of checkpoint progress

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