Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 1D1CF4767C1 for ; Wed, 16 Oct 2002 15:53:49 -0400 (EDT) Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by postgresql.org (Postfix) with ESMTP id A4228476799 for ; Wed, 16 Oct 2002 15:53:46 -0400 (EDT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id g9GJrZK27717; Wed, 16 Oct 2002 15:53:35 -0400 (EDT) From: Bruce Momjian Message-Id: <200210161953.g9GJrZK27717@candle.pha.pa.us> Subject: Re: newbie qs; fixing and checking databases In-Reply-To: <200210161936.g9GJaHQ03777@socrates.Berkeley.EDU> To: Rusty Wright Date: Wed, 16 Oct 2002 15:53:35 -0400 (EDT) Cc: tgl@sss.pgh.pa.us, pgsql-admin@postgresql.org X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200210/119 X-Sequence-Number: 5977 Rusty Wright wrote: > It seems to me that if the machine crashes in the middle of a > transaction that there will be or is a very high chance of database > corruption. I don't know if and how postgresql would detect and > handle that after the system reboots. We are running mysql here and > haven't had any data integrity problems. No chance of corruption. On restart, the WAL file will bring the system back to the state before the transaction started. In fact, the WAL doesn't even have to be used because the transaction isn't marked as completed yet. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073