Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 4C1AE9FBD89 for ; Wed, 25 Apr 2007 17:26:32 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 96649-03 for ; Wed, 25 Apr 2007 17:26:21 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from howe.textdrive.com (howe.textdrive.com [207.7.108.240]) by postgresql.org (Postfix) with ESMTP id A54EB9FBA14 for ; Wed, 25 Apr 2007 17:26:24 -0300 (ADT) Received: from [10.0.23.17] (unknown [209.149.59.218]) by howe.textdrive.com (Postfix) with ESMTP id C7865120FF1; Wed, 25 Apr 2007 20:26:22 +0000 (GMT) In-Reply-To: <1177512153.20637.116.camel@silverbirch.site> References: <09318B6D-8C60-4287-978E-EAE199ACA15E@o.ptimized.com> <1177512153.20637.116.camel@silverbirch.site> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Cc: Simon Riggs Content-Transfer-Encoding: 7bit From: "Thomas F. O'Connell" Subject: Re: [DOCS] Incrementally Updated Backups: Docs Clarification Date: Wed, 25 Apr 2007 15:26:19 -0500 To: pgsql-general@postgresql.org X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/1093 X-Sequence-Number: 112996 On Apr 25, 2007, at 9:42 AM, Simon Riggs wrote: > On Thu, 2007-04-19 at 15:48 -0500, Thomas F. O'Connell wrote: > >> "If we take a backup of the standby server's files while it is >> following logs shipped from the primary, we will be able to reload >> that data and restart the standby's recovery process from the last >> restart point. We no longer need to keep WAL files from before the >> restart point. If we need to recover, it will be faster to recover >> from the incrementally updated backup than from the original base >> backup." >> >> I'm specifically confused about the meaning of the following phrases: >> >> "backup of the standby server's files" - Which files? > > the files that make up the database server: > - data directory > - all tablespace directories > >> "reload that data" - What does this mean in postgres terms? > > copy back from wherever you put them in the first place > > "that data" referring to the "files that make up the db server" > >> "last restart point" - What is this? Wouldn't it be able to restart >> from the last recovered file, which would presumably occur later than >> the last restart point? > > No, we don't restart file-by-file. > > http://developer.postgresql.org/pgdocs/postgres/continuous- > archiving.html#BACKUP-PITR-RECOVERY > > "If recovery finds a corruption in the WAL..." onwards explains the > restart mechanism. It's much like checkpointing, so we don't restart > from the last log file we restart from a point possibly many log files > in the past. > >> Does this mean make a filesystem backup of the standby server's data >> directory while it's stopped, and then start it again with that data >> and the restricted set of WAL files needed to continue recovery? > > No need to stop server. Where do you read you need to do that? > >> I'd like to see the language here converted to words that have more >> meaning in the context of postgres. I'd be happy to attempt a >> revision >> of this section once I'm able to complete an incrementally updated >> backup successfully. > > Feel free to provide updates that make it clearer. > >> Here's how I envision it playing out in practice: >> >> 1. stop standby postgres server >> 2. [optional] preserve data directory, remove unnecessary WAL files >> 3. restart standby server > > step 2 only. > > Clearly not an optional step, since its a 1 stage process. :-) > > -- > Simon Riggs > EnterpriseDB http://www.enterprisedb.com Well, this conversation made things a lot clearer, but I'm not sure (yet) how to patch the docs. It seems like the original version is written in general terms, whereas what our Q&A produces here is very postgres-specific. I'll see if I can produce a version that would be add clarity (for me). -- Thomas F. O'Connell optimizing modern web applications : for search engines, for usability, and for performance : http://o.ptimized.com/ 615-260-0005