Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 61376475C8B for ; Fri, 24 Jan 2003 09:12:16 -0500 (EST) Received: from lakemtao02.cox.net (lakemtao02.cox.net [68.1.17.243]) by postgresql.org (Postfix) with ESMTP id A8A01475B8E for ; Fri, 24 Jan 2003 09:12:15 -0500 (EST) Received: from [192.168.1.1] ([68.11.66.83]) by lakemtao02.cox.net (InterMail vM.5.01.04.05 201-253-122-122-105-20011231) with ESMTP id <20030124141219.END6744.lakemtao02.cox.net@[192.168.1.1]> for ; Fri, 24 Jan 2003 09:12:19 -0500 Subject: Crash Recovery, pt 2 From: Ron Johnson To: PgSQL Performance ML In-Reply-To: <20030124082219.B26558@mail.libertyrms.com> References: <2147483647.1043361178@[10.0.1.133]> <20030124082219.B26558@mail.libertyrms.com> Content-Type: text/plain Organization: Message-Id: <1043417539.29437.82.camel@haggis> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.1 Date: 24 Jan 2003 08:12:19 -0600 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/280 X-Sequence-Number: 927 On Fri, 2003-01-24 at 07:22, Andrew Sullivan wrote: > On Thu, Jan 23, 2003 at 10:32:58PM -0500, Noah Silverman wrote: > > To preface my question, we are still in the process of evaluating postgres > > to determine if we want to switch our production environment over. > > > > I'm curious about where I can find documentation about crash recovery in > > postgres. In mysql, there is a nice table recovery utility (myisamchk). > > It recovers automatically. Make sure you run with fsync turned on. > That calls fsync on the WAL at the point of every COMMIT, and COMMIT > isn't finished before the fsync returns. Then, in case of a crash, > the WAL just plays back and fixes up the data area. On commercial databases, there's a command to flush the roll-forward logs to tape at intervals during the day. Thus, if the disk(s) get corrupted, one can restore the database to new disks, then apply the on-tape roll-forward logs to the database, and you'd have only lost a few hours of data, instead of however many hours (or days) it's been since the last database backup. Also, flushing them to tape (or a different partition) ensures that they don't fill up the partition during a particularly intensive batch job. Are there any FM's that explain how this works in Postgres? Thanks, Ron -- +---------------------------------------------------------------+ | Ron Johnson, Jr. mailto:ron.l.johnson@cox.net | | Jefferson, LA USA http://members.cox.net/ron.l.johnson | | | | "Fear the Penguin!!" | +---------------------------------------------------------------+