Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cViLe-00005b-JS for pgsql-performance@arkaria.postgresql.org; Mon, 23 Jan 2017 17:24:06 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cViLe-0007JZ-38 for pgsql-performance@arkaria.postgresql.org; Mon, 23 Jan 2017 17:24:06 +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.84_2) (envelope-from ) id 1cViLd-0007JB-An for pgsql-performance@postgresql.org; Mon, 23 Jan 2017 17:24:05 +0000 Received: from tamriel.snowman.net ([72.66.115.51]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cViLZ-0002tL-TM for pgsql-performance@postgresql.org; Mon, 23 Jan 2017 17:24:04 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id A158C5F796; Mon, 23 Jan 2017 12:23:01 -0500 (EST) Date: Mon, 23 Jan 2017 12:23:01 -0500 From: Stephen Frost To: Jeff Janes Cc: julyanto SUTANDANG , Dinesh Chandra 12108 , "pgsql-performance@postgresql.org" Subject: Re: Backup taking long time !!! Message-ID: <20170123172301.GH18360@tamriel.snowman.net> References: <0fb0c8c3f69340a3a7d70b1c39fa2b2c@cyient.com> <20170122145740.GE18360@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="rKx0vKsfcQ2Qh7ad" Content-Disposition: inline In-Reply-To: X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.13.0-91-generic (x86_64) X-Uptime: 12:22:10 up 198 days, 18:46, 5 users, load average: 0.24, 0.21, 0.17 User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -5.1 (-----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org --rKx0vKsfcQ2Qh7ad Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Jeff Janes (jeff.janes@gmail.com) wrote: > On Sun, Jan 22, 2017 at 6:57 AM, Stephen Frost wrote: > > Just to make sure anyone reading the mailing list archives isn't > > confused, running pg_start_backup does *not* make PG stop writing to > > BASEDIR (or DATADIR, or anything, really). PG *will* continue to write > > data into BASEDIR after pg_start_backup has been called. >=20 > Correct. Unfortunately it is a very common myth that it does cause > PostgreSQL to stop writing to the base dir. I would love a way to dispel that myth. :/ If you have any suggestions of how we could improve the docs, I'd certainly be happy to take a look and try to help. > > The only thing that pg_start_backup does is identify an entry in the WAL > > stream, from which point all WAL must be replayed when restoring the > > backup. All WAL generated from that point (pg_start_backup point) until > > the pg_stop_backup point *must* be replayed when restoring the backup or > > the database will not be consistent. >=20 > pg_start_backup also forces full_page_writes to be effectively 'on' for t= he > duration of the backup, if it is not already explicitly on (which it > usually will already be). This affects pg_xlog, of course, not base. But > it is an essential step for people who run with full_page_writes=3Doff, a= s it > ensures that anything in base which got changed mid-copy will be fixed up > during replay of the WAL. Agreed. Thanks! Stephen --rKx0vKsfcQ2Qh7ad Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJYhjv1AAoJEO1sijiDR2RVKqsP/0Ie3AHkCp83DZEm6BTr9ayJ UGmRhxhT23E5cZRGRbSEEMl4/kxW3VtDkguCMtpUCezFfnv4DUTCusFaA0K0t6gZ +69Kj3f/jiu/CfJ5WtLB0vzx+WYYTD4XQlvALLAJD/ao/hRo7bs74OJy2138QAZz pCaLFfvHx7uZsrgQ8bR9kX64A/WbGOSwHwO4iB5Q1AO6ToCkMQyFks+vHldmYrGA +nJyt8xhfnPcfFEsRmrTCCe79baY2wq10MLPPJGtQ3+ISSndVF+YUGNZASObYbrQ Nca+tL9we18zL7dbeZNJE8Qx+CGGcGB3hHqFgR9jIkN0HtbwjRxMZ/DUG7xF89I6 93qBg3i5a1mjiQQUHsQTfYhg161ueUvcggkLbNMxqiDzlnUvCdMNX4jDYBj0hcqK d2OBY0Q7/KnFMsYl2V/tZDUxWjeNUgqtZFKC62wLatxX51IOoTauWpRQTBPhqJKZ 1xWLqzErc4C9PmwsxzZtFikwMqAD3n/BrF+mcrT9dcLQbd+EoWZzWg3MJD0ahFzA fpmyy95JSW8uU7vJnEwBsZ2hDQe44O6jmpVPG3r8CxxfNqmV38AD5QhK+2HeEOEu Sg+BgdczR1+V+qJiMfaz0PC8Noz/434TV3NF5VaTdQ0LKtA+uH2JNc+kN9IIrEOl FmBA9VKCplU/qVH3Nq86 =gU9m -----END PGP SIGNATURE----- --rKx0vKsfcQ2Qh7ad--