Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id DF71D9F9BEA for ; Mon, 20 Aug 2007 14:01:00 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 62361-05 for ; Mon, 20 Aug 2007 14:00:56 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.185]) by postgresql.org (Postfix) with ESMTP id C9BFE9F961F for ; Mon, 20 Aug 2007 14:00:56 -0300 (ADT) Received: by rv-out-0910.google.com with SMTP id l15so969937rvb for ; Mon, 20 Aug 2007 10:00:55 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=dvFVGCHKEeUBb6AkUl2n+iKWY7An2J2s617XIa7Vd0cc4xUiNtcOEdwBN6+ndqEewEfUXupDiCpt18sygshKEMPQv03sSaAMZBLfSDEDAHJSvY3EqcmkqQ6AGwvvB4VFIqeM0fvppJz21NWdJB5JvTUTeCIxz8SO23RHcBuNzOU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=FuERtda2NU61z/y4A18ZOFreF2TJu4gLyLExpggjV0Z9pb9de/GpmSfcF2aPt+5qqimhpO20GEBiakzg6N117hECRwXS+Vyk1TUHbPRHH/FuJDkoRiatQZ0QoGZt58gmkxqH3pESHDJi6a0IsPIt434FSy65rw1g5wbQ0mho97g= Received: by 10.141.76.21 with SMTP id d21mr2832781rvl.1187629255775; Mon, 20 Aug 2007 10:00:55 -0700 (PDT) Received: by 10.141.98.12 with HTTP; Mon, 20 Aug 2007 10:00:55 -0700 (PDT) Message-ID: Date: Mon, 20 Aug 2007 12:00:55 -0500 From: "Scott Marlowe" To: "luis perruca" Subject: Re: SOS. Database Lost Cc: pgsql-admin@postgresql.org In-Reply-To: <16e1f7ed0708200324w227a4f86q4fd3337f4a402f00@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <16e1f7ed0708200324w227a4f86q4fd3337f4a402f00@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/227 X-Sequence-Number: 26558 On 8/20/07, luis perruca wrote: > > Hi All: I'm From Spain and I'll try to write in english as best as possib= le: Your english > my spanish, so please don't worry. > I'm new in the list, and I have a serious problem: I am novice with > Postgresql and I haven't found any solution. > I Wil descrive the scenario: > > I have Postgresql 8.0.1 running on Windows 2003 Server. > I have a Backup of my database, but is a little old A pg_dump type backup, or a file system backup? > And here is my problem: > > First, the Postgresql service didn't started (really started, but shut do= wn > immediatly) What steps led to this happening. They might be important. Did you install new /update software on this server? Especially anti-virus software? That stuff's nearly as dangerous as a virus itself for a database. What are the exact error messages you got when this happened. > then I copied all the "postgresql" folder in other place, uninstalled and > reinstalled Postgresql, and then overwrite the "data" folder with the one > from the copy that I did. Did you shut down postgresql while you were copying those files back? > Now, the service starts properly, but the database doesn=B4t work. I did > "pg_resetxlog" (I don=B4t know what it does, but I saw it somewhere). It reselts the transaction log pointer. It has likely set back in time to when there was nothing in the database. Just guessing. > From pgAdmin III, I see the database, I access it, I see the tables and > their properties, but no data. I get the error "xlog flush request > 6D/432AAAA8 is not satisfied --- flushed only to 0/C03D020 CONTEXT: writ= ing > block 925 of relation 16631/17254/18128" when I try to view the tables Have you still got that old pg directory? Try shutting down pgsql, copying the data part back in place, and restarting pgsql and see if it starts up right or not. > I would need to know if I can recover the data from the tables and how to= do > it. Can't tell from what you've told us so far. Need more info of how you got into this state and exact error messages you're getting as well. My one piece of advice would be that if you data that's important, look into running PostgreSQL (or any database really) on a unix box with regular backups. If you must use windows use a single purpose machine firewalled away from the rest of the universe with only a pgsql port (5432) showing and no logins for anyone but the DBA to the machine.