Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 17A0D632E56 for ; Tue, 17 Feb 2009 05:34:55 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 02418-05 for ; Tue, 17 Feb 2009 05:34:51 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-gx0-f224.google.com (mail-gx0-f224.google.com [209.85.217.224]) by mail.postgresql.org (Postfix) with ESMTP id E719A632592 for ; Tue, 17 Feb 2009 05:34:51 -0400 (AST) Received: by gxk24 with SMTP id 24so4990172gxk.19 for ; Tue, 17 Feb 2009 01:34:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=q9YFpXNxP7m3adWet6pnN5rDnl7Ii8pDog3zVgapnVQ=; b=HIESiuT1EVq0JtYuZtKF+35oRnYi7RtxznT55mVP6NYGa9ItFmAPzzpQ6l7VJsYDw6 H7xzYGfTm68+ZaI0Blt/hgQ9gAnEOry2ZHzsbotchi1t0FZrJ+brlvZmMZ0rJwE3uB/6 Y3PKB5POD2v/s4nNTXPvbbSzm2gjySGdo4vm8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=tEkg6k3hhMUZKrh5uCefsSiWUGTgdRiiCtA2l9J+7zLiJpjQ9UNz+r6S727wRHe52f zCqYr1hh4OPMGHH/GYQeL1kE4yxffZARCUbFgu/ky7KNRWzSxdFWfApxf+BZQ21fZxhp LOe5+qLewq8D4cX3AZTG29oxlfWtX8oQDWCN8= MIME-Version: 1.0 Received: by 10.150.157.17 with SMTP id f17mr155821ybe.199.1234863290962; Tue, 17 Feb 2009 01:34:50 -0800 (PST) In-Reply-To: <200902171112.31632.achill@matrix.gatewaynet.com> References: <200902170954.52983@zmi.at> <200902171112.31632.achill@matrix.gatewaynet.com> Date: Tue, 17 Feb 2009 02:34:50 -0700 Message-ID: Subject: Re: 8.3.5 broken after power fail From: Scott Marlowe To: Achilleas Mantzios Cc: pgsql-admin@postgresql.org, Michael Monnerie Content-Type: text/plain; charset=ISO-8859-7 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200902/110 X-Sequence-Number: 31331 2009/2/17 Achilleas Mantzios : > =D3=F4=E9=F2 Tuesday 17 February 2009 10:54:52 =EF/=E7 Michael Monnerie = =DD=E3=F1=E1=F8=E5: > >> * your daughter with 3.5 years switching off the power supply of the >> server > 1st line of defense is to set your system to shutdown normally when the p= ower button is pressed. > 2nd line of defense is to get your self a decent UPS unit > > My daughter does this all the time on our family FreeBSD box. No probs. > > Also at work at more than 20 tanker vessels running 7.4.2, the captains d= o that on a constant > basis and PgSQL always has survived (more than the rest of the system any= ways..) Those are all good to have. But no UPS is a replacement for hard drives / RAID controllers / file systems that don't lie about fsync. Nothing makes your database shine like being the only one in the hosting center that survives sudden catastrophic power failure. >> What can I do? tether your daughter to the other side of the room? I'm not sure which parts of those mount options are dangerous or not. I use ext3 stock with noatime. And a battery backed RAID. Smaller slower work group / station controllers (i.e. 5 year old server conrollers) go for pretty cheap and give pretty good performance with 2 or 4 drives. AS for fixing it, I believe the answer involves creating a clog file full of zeros 16Meg or so, and pg_reset_xlog. Don't count on all your data being there or all your FK-PK type relationships to be correct, Immediately dump it, initdb and reload your data, fixing it as you go.