Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id E7C511337BDA for ; Tue, 12 Apr 2011 10:49:46 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 10191-03 for ; Tue, 12 Apr 2011 13:49:29 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from exchangevm.soapware.com (exchangevm.soapware.com [216.176.33.44]) by mail.postgresql.org (Postfix) with ESMTP id 96E0A1337B67 for ; Tue, 12 Apr 2011 10:49:28 -0300 (ADT) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: Re: pg_start_backup - backups Date: Tue, 12 Apr 2011 08:49:27 -0500 Message-ID: <7E0E9F0DF4C17A40BE6F616E6492B4D353E766@ExchangeVM.DOCS.COM> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [ADMIN] pg_start_backup - backups Thread-Index: Acv4X8FMZQVcE9kOR+6kYyTF6bIE9gAuExwA References: <1302200280041-4289135.post@n5.nabble.com> <7E0E9F0DF4C17A40BE6F616E6492B4D353E507@ExchangeVM.DOCS.COM> <4DA2DC30020000250003C644@gw.wicourts.gov> From: "David Roland" To: "Kevin Grittner" , "Ian Lea" Cc: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201104/112 X-Sequence-Number: 37293 Thanks Kevin and Ian for your replies. Your information confirms activity I was noticing, but without indepth knowledge of what goes on "behind the current" I was left to speculation - a situation I am extremely uncomfortable with. I have read and re-read the existing documentation on backup and restore for postgresql and I believe we have all of the pieces in place. You both have been a big help. Thanks, David -----Original Message----- From: Kevin Grittner [mailto:Kevin.Grittner@wicourts.gov]=20 Sent: Monday, April 11, 2011 10:47 AM To: Ian Lea; David Roland Cc: pgsql-admin@postgresql.org Subject: Re: [ADMIN] pg_start_backup - backups "David Roland" wrote: =20 > changes to the data folder continue even after the PG_START_BACKUP=20 > command has been issued. This implies to me that the contents of any=20 > copy of the data folder may be unreliable. i.e. the copy may not=20 > reflect the state of the data folder either before the copy started or > after the copy has finished. It may reflect the state of the data=20 > folder in some transient form. =20 Right. =20 > Assuming this is true, is the copy still usable for restoration? =20 Yes. =20 > If so, how does PostgreSQL get the data folder to a stable state? Is=20 > it by the use of the WAL files that may be created during the backup=20 > process and the restore.config file? =20 Exactly. Simplifying somewhat: =20 - The pg_start_backup causes the WAL position to be remembered. You will need to start WAL replay at this point. =20 - Every significant change to a page is WAL-logged. =20 - Changes after you record the restart point may or may not be in the base backup. =20 - After the base backup copying is complete, pg_stop_backup records the WAL position. You will need to replay WAL *at least* to this point to have a consistent database. =20 - WAL replay will bring every page modified after the "start" to a valid state, whether or not any or all direct modifications to that page made it into the base backup. =20 - This actually goes beyond page fix-ups to file creation and deletion, etc. =20 -Kevin