pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Pierre Timmermans <ptim007@yahoo.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: using pg_basebackup for point in time recovery
Date: Thu, 21 Jun 2018 14:27:25 +0900
Message-ID: <20180621052725.GC1679@paquier.xyz> (raw)
In-Reply-To: <1402042632.2394593.1529481991918@mail.yahoo.com>
References: <CAM3msVY35_tX+1kd9oWBwXjc5=Qe6c09d+FJcuAREafNM-wpYw@mail.gmail.com>
	<540f4e66-24c0-507d-9610-8c0f1205798b@aklaver.com>
	<CANu8Fiz8WUk6KQvuRVbJ5ORPdLzRo6bZwYVgWPmu4+syG+0+QA@mail.gmail.com>
	<CAM3msVYuk=ftRUEg+snjwZn1mn_4UtYWc0_KtjozFt1OwpXxBQ@mail.gmail.com>
	<5d37a105-501f-5718-0e70-9a64978d5547@gmail.com>
	<202988089.1841507.1529409838414@mail.yahoo.com>
	<20180620033800.GA19346@paquier.xyz>
	<1402042632.2394593.1529481991918@mail.yahoo.com>

Hi Pierre,

On Wed, Jun 20, 2018 at 08:06:31AM +0000, Pierre Timmermans wrote:
> Hi Michael

You should avoid top-posting on the Postgres lists, this is not the
usual style used by people around :)

> Thanks for the confirmation. Your rewording removes the confusion. I
> would maybe take the opportunity to re-instate that pg_dump cannot be
> used for PITR, so in the line of 
> "These are backups that could be used for point-in-time recovery if
> combined with a WAL archive able to recover up to the wanted recovery
> point.  These backups are typically much faster to backup and restore
> than pg_dump for large deployments but can result as well in larger
> backup sizes, so the speed of one method or the other is to evaluate
> carefully first. Consider also that pg_dump backups cannot be used for
> point-in-time recovery."

Attached is a patch which includes your suggestion.  What do you think?
As that's an improvement, only HEAD would get that clarification.

>  Maybe the confusion stems from the fact that if you restore a
> standalone (self-contained) pg_basebackup then - by default - recovery
> is done with the recovery_target immediate option, so if one needs
> point-in-time recovery he has to edit the recovery.conf and brings the
> archives..

Perhaps.  There is really nothing preventing one to add a recovery.conf
afterwards, which is also why pg_basebackup -R exists.  I do that as
well for some of the framework I work with and maintain.
--
Michael

Attachments:

pitr-docs.patch (text/x-diff, 1.4K) download diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml index 982776ca0a..ccc0a66bf3 100644 --- a/doc/src/sgml/backup.sgml +++ b/doc/src/sgml/backup.sgml @@ -1430,12 +1430,15 @@ restore_command = 'cp /mnt/server/archivedir/%f %p' <title>Standalone Hot Backups</title> <para> - It is possible to use <productname>PostgreSQL</productname>'s backup facilities to - produce standalone hot backups. These are backups that cannot be used - for point-in-time recovery, yet are typically much faster to backup and - restore than <application>pg_dump</application> dumps. (They are also much larger - than <application>pg_dump</application> dumps, so in some cases the speed advantage - might be negated.) + It is possible to use <productname>PostgreSQL</productname>'s backup + facilities to produce standalone hot backups. These are backups that + could be used for point-in-time recovery if combined with a WAL + archive able to recover up to the wanted recovery point. These backups + are typically much faster to backup and restore than pg_dump for large + deployments but can result as well in larger backup sizes, so the + speed of one method or the other is to evaluate carefully first. Note + also that <application>pg_dump</application> backups cannot be used + for point-in-time recovery. </para> <para>
signature.asc (application/pgp-signature, 832B) download

view thread (13+ messages)  latest in thread

Message-ID: <20180621052725.GC1679@paquier.xyz>
Permalink:  ../20180621052725.GC1679@paquier.xyz/
Also on:    postgresql.org/message-id/20180621052725.GC1679@paquier.xyz

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: michael@paquier.xyz, ptim007@yahoo.com
  Subject: Re: using pg_basebackup for point in time recovery
  In-Reply-To: <20180621052725.GC1679@paquier.xyz>
  References: <CAM3msVY35_tX+1kd9oWBwXjc5=Qe6c09d+FJcuAREafNM-wpYw@mail.gmail.com> <540f4e66-24c0-507d-9610-8c0f1205798b@aklaver.com> <CANu8Fiz8WUk6KQvuRVbJ5ORPdLzRo6bZwYVgWPmu4+syG+0+QA@mail.gmail.com> <CAM3msVYuk=ftRUEg+snjwZn1mn_4UtYWc0_KtjozFt1OwpXxBQ@mail.gmail.com> <5d37a105-501f-5718-0e70-9a64978d5547@gmail.com> <202988089.1841507.1529409838414@mail.yahoo.com> <20180620033800.GA19346@paquier.xyz> <1402042632.2394593.1529481991918@mail.yahoo.com> <20180621052725.GC1679@paquier.xyz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox