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

WAL "low watermark" during base backup

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: WAL "low watermark" during base backup
Date: 2011-09-02 17:52:40
Message-ID: CABUevEy0--b0wyTV+h=hxs32oz73jNrrtLDXKKmCWEmr0dBACQ@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
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)

It obviously needs some documentation updates as well, but I wanted to
get some comments on the way it's done before I work on those.

-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

Attachment: wal_low_watermark.patch
Description: text/x-patch (4.2 KB)

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2011-09-02 17:53:56
Subject: Re: pg_upgrade automatic testing
Previous:From: Magnus HaganderDate: 2011-09-02 17:16:35
Subject: Re: postgresql.conf archive_command example

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