Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fVs8A-0003Xx-Sa for pgsql-general@arkaria.postgresql.org; Thu, 21 Jun 2018 05:27:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fVs88-0001NU-PQ for pgsql-general@arkaria.postgresql.org; Thu, 21 Jun 2018 05:27:36 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fVs87-0001N3-1l for pgsql-general@lists.postgresql.org; Thu, 21 Jun 2018 05:27:36 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fVs83-0005B5-Aj for pgsql-general@lists.postgresql.org; Thu, 21 Jun 2018 05:27:33 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id C74CC21910; Thu, 21 Jun 2018 01:27:29 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 21 Jun 2018 01:27:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=Ko0mj5NTFbGxUglnRBRBL09H5QoC/+hF6PM5I1f9W08=; b=kPjmAq6d XsRdnRAwRx7pWIlD7CduUFEfYFbb/ug0X4ZuS111r6J2Yn6NWdNK7aHS1O53XZXr r4Ry3q9zyX9nI5zY3xfExo5D2h5T2w/JtnKXduDdXSxnLeaOoTT0eoExeC9awG0O YjlfnX4EstcxXZ9HKKT1ofjfp7cBYywtaYRYZimKpyPOWAruBH4yIywicvppRAne GpROpFM8lhrwv+dzBJMomTW6QxHnh1zB2MRhOhrtxut2B7iWWR9MqeCcZEf/vc3i 92cvppF8aJNdWf2/QNd6bvJ38ITyZqCyEsoeq5csixEJN5BYS3GaotW9ORgeL4A7 a9Ay+4bSMTPn8g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=Ko0mj5NTFbGxUglnRBRBL09H5QoC/ +hF6PM5I1f9W08=; b=ZfDTa2iQt4/PW04vKVJthsOJwYaLk7NRmkL5/5vU/skqw DOXruLWZRtPVoER0eEXdvCdUO0VL74Zy88y5z7tYsoArENIUwy7guJCT7RshwNsS DKAqLpzUIjyKMio7I/tMWcB3IX4xrrGBjbzBNQNey7ehVRWxopJ/ypJ4XywTRtWf vrT6TCYBbspKNdStu5gkR4LgbzKKnhrie0e6WoTB8KWhBZde+PUia9gjm3zN81Da YApiLeT44z75+x5Xs0uqIk9w7BiDHwUZmnMhmE1RdZ3ccLphU87t+E6OaaZ/id0q 2KcU25K4Z3Jj5N9tB+yXbSFuCfuQ20zb9rt5v8CXg== X-ME-Proxy: X-ME-Sender: Received: from paquier.xyz (c137162.net61215.cablenet.ne.jp [61.215.137.162]) by mail.messagingengine.com (Postfix) with ESMTPA id 6C580E446F; Thu, 21 Jun 2018 01:27:28 -0400 (EDT) Date: Thu, 21 Jun 2018 14:27:25 +0900 From: Michael Paquier To: Pierre Timmermans Cc: pgsql-general@lists.postgresql.org Subject: Re: using pg_basebackup for point in time recovery Message-ID: <20180621052725.GC1679@paquier.xyz> References: <540f4e66-24c0-507d-9610-8c0f1205798b@aklaver.com> <5d37a105-501f-5718-0e70-9a64978d5547@gmail.com> <202988089.1841507.1529409838414@mail.yahoo.com> <20180620033800.GA19346@paquier.xyz> <1402042632.2394593.1529481991918@mail.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="3Gf/FFewwPeBMqCJ" Content-Disposition: inline In-Reply-To: <1402042632.2394593.1529481991918@mail.yahoo.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --3Gf/FFewwPeBMqCJ Content-Type: multipart/mixed; boundary="4jXrM3lyYWu4nBt5" Content-Disposition: inline --4jXrM3lyYWu4nBt5 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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=20 > "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.=A0 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. > =A0Maybe 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 --4jXrM3lyYWu4nBt5 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="pitr-docs.patch" Content-Transfer-Encoding: quoted-printable 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 =3D 'cp /mnt/server/archivedir/%f %= p' Standalone Hot Backups =20 - It is possible to use PostgreSQL'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 pg_dump dumps. (They are al= so much larger - than pg_dump dumps, so in some cases the = speed advantage - might be negated.) + It is possible to use PostgreSQL'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 back= ups + are typically much faster to backup and restore than pg_dump for lar= ge + deployments but can result as well in larger backup sizes, so the + speed of one method or the other is to evaluate carefully first. No= te + also that pg_dump backups cannot be used + for point-in-time recovery. =20 --4jXrM3lyYWu4nBt5-- --3Gf/FFewwPeBMqCJ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlsrNz0ACgkQnvQgOdby QH1AIw/9GOgq6y+jD9bXOIrw0vZPldshApqYJ+b5iNH255BKgRLmaMO4Y8peSLqH OMLUgH1XVeOT1mbfpeJeiSreMh0SfuAuT7ITJ/qdoShcCIsL0alvXtQqxSSBacSX jKbN1PjvHz0AmJq7eLNXuJy0yRNgiERcOlofkAtwUsNc3SgWf1NYMgvFixoiva8Q c4t8+qMp01p8KLqX7r4n0m+uvSXtfvspnXEHBwwXBnFcGA+nhv8NlNUXZ9T8FyBP vu3nySIkUTh5xVQ3llYgN9RLGyMDgp+TbOq0gty5Q/PE4efQlYh9eNM1SFMJ4yOw 1u4AdhoadrA95MDNps5s1R39NI0KVxNINfsk2ekaqthrOR2Y4IQ8idcmd2hDGG6K tTM7V9Yyl7sKYkk9xPuVdKvSbwxf27y4TDsa7T6MYzpQi6CB4Tuj2rvcoqlKyVri eWQl6Hr/8yk8GMQ8KojCHx4oAc+jbG0+GyMn7CHnw8tHpmJCo7eekmx9jMmGmK5L YNv02DBhFewiFWpZmsfjN8MUjpuLq8ujt4wFtmBbdKn58i1FuCcdS4/hWk2AwKcz 2HHVgaNnWoANCU0upEfXjpwl0toQIzH1US9U4cGfuWBscUCm2Wa6icinomVIkf6y CVQ2CCw3mBdipKMEKDKydyOFZK7IP1L461Whp9cnFf1ZjRTNXi4= =PXhn -----END PGP SIGNATURE----- --3Gf/FFewwPeBMqCJ--