Re: using pg_basebackup for point in time recovery

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Vik Fearing <vik(dot)fearing(at)2ndquadrant(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Pierre Timmermans <ptim007(at)yahoo(dot)com>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: using pg_basebackup for point in time recovery
Date: 2018-06-21 23:50:38
Message-ID: CAKFQuwZ0i7ZXFvWz6dqyz2-t=CSPhj0eKFWRKQNWnRfF4hfufA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jun 21, 2018 at 4:26 PM, Vik Fearing <vik(dot)fearing(at)2ndquadrant(dot)com>
wrote:

> On 21/06/18 07:27, Michael Paquier wrote:
> > Attached is a patch which includes your suggestion. What do you think?
> > As that's an improvement, only HEAD would get that clarification.
>
> Say what? If the clarification applies to previous versions, as it
> does, it should be backpatched. This isn't a change in behavior, it's a
> change in the description of existing behavior.
>

Generally only actual bug fixes get back-patched; but I'd have to say this
looks like it could easily be classified as one.

Before: These are backups that cannot be used for PITR
After: These are backups that could be used for PITR if ...

Changing a cannot to a can seems like we are fixing a bug in the
documentation.

Some comments on the patch itself:

"recover up to the wanted recovery point." - "desired recovery point" reads
better to me

====
"These backups are typically much faster to backup and restore" - "These
backups are typically much faster to create and restore"; avoid repeated
use of the word backup

"but can result as well in larger backup sizes" - "but can result in larger
backup sizes", drop the unnecessary 'as well'

"sizes, so the speed of one method or the other is to evaluate carefully
first" - that is just wrong as-is; suggest just removing it.
====

To cover the last three items as a whole I'd suggest:

"These backups are typically much faster to create and restore, but
generate larger file sizes, compared to pg_dump."

For the last sentence I'd suggest:

"Note that because WAL cannot be applied on top of a restored pg_dump
backup it is considered a cold backup and cannot be used for
point-in-time-recovery."

I like adding "cold backup" here to help contrast and explain why a base
backup is considered a "hot backup". The rest is style to make that flow
better.

David J.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Munro 2018-06-22 04:20:38 Re: Can PostgreSQL create new WAL files instead of reusing old ones?
Previous Message Vik Fearing 2018-06-21 23:26:57 Re: using pg_basebackup for point in time recovery