Re: Include WAL in base backup - Mailing list pgsql-hackers

From Dimitri Fontaine
Subject Re: Include WAL in base backup
Date
Msg-id m262tper22.fsf@2ndQuadrant.fr
Whole thread Raw
In response to Include WAL in base backup  (Magnus Hagander <magnus@hagander.net>)
Responses Re: Include WAL in base backup  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers
Magnus Hagander <magnus@hagander.net> writes:
> Here's a cutdown version of the idea about including WAL in the base
> backup. What I initially wanted was to introduce a way to guarantee
> that the required WAL (with some sort of cutoff of course) would be
> available for the backup, but I ran out of time for that. We can
> always add that later.

What if you start a concurrent process that begins streaming the WAL
segments just before you start the backup, and you stop it after having
stopped the backup.  I would think that then, the local received files
would be complete.  We would only need a program able to stream the WAL
segments and build WAL files from that… do you know about one? :)

> For now, you need to set wal_keep_segments to make it work properly,

That's quite a big foot gun, isn't it?  You would have to at least offer
an option to check for your backup or to call it broken when you miss
some WAL files on the server.

The only other safe option I know about that's not a pg_streamrecv
subprocess would be to require archiving for the duration of the base
backup, but I think we agreed that it would be nice being able to bypass
that.

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


pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: What happened to open_sync_without_odirect?
Next
From: Josh Berkus
Date:
Subject: Re: auto-sizing wal_buffers