X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id F20C05323D for ; Fri, 1 Apr 2005 16:23:03 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 61815-03 for ; Fri, 1 Apr 2005 15:22:54 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 1328153223 for ; Fri, 1 Apr 2005 16:22:53 +0100 (BST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j31FMrMS006532; Fri, 1 Apr 2005 10:22:54 -0500 (EST) To: "L.Boldareva" Cc: pgsql-admin@postgresql.org Subject: Re: How to recover when can't start database In-reply-to: References: Comments: In-reply-to "L.Boldareva" message dated "Fri, 01 Apr 2005 12:02:21 +0200" Date: Fri, 01 Apr 2005 10:22:53 -0500 Message-ID: <6531.1112368973@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/13 X-Sequence-Number: 17026 "L.Boldareva" writes: > LOG: database system was not properly shut down; automatic recovery in > progress > LOG: redo starts at 5/6F000ABC > PANIC: btree_split_redo: lost left sibling > LOG: startup process (PID 5603) was terminated by signal 6 Hmm. AFAICS that could only happen if a page split record is pointing at an "original" page that's not there anymore; that is, the page is past what the kernel says is the end of the file. Exactly how did you get into this state ... was there a system-level crash involved? ISTM this cannot happen unless the filesystem has dropped data. You could probably get it to start by changing the "false" to "true" in this call of XLogReadBuffer /* Left (original) sibling */ buffer = XLogReadBuffer(false, reln, leftsib); if (!BufferIsValid(buffer)) elog(PANIC, "btree_split_%s: lost left sibling", op); in src/backend/access/nbtree/nbtxlog.c (it's line 261 in CVS tip, possibly a little different in 8.0). Let us know if that helps. I'd be a bit suspicious of the contents of the index, if not the whole database, so an immediate dump,reinitdb,reload might be your most prudent course of action after you get it to start. Plan B would be to wipe out the WAL log with pg_resetxlog. This will allow you to start but the odds of having corrupt data afterwards would be about 100% ... you *must* dump and reload if you go that way. regards, tom lane