Received: from svr1.fondos.net ([216.247.232.112]) by hub.org (8.9.3/8.9.3) with SMTP id FAA71373 for ; Mon, 8 May 2000 05:09:40 -0400 (EDT) (envelope-from oserra@fondos.net) Received: (qmail 2790 invoked from network); 8 May 2000 09:10:03 -0000 Received: from unknown (HELO p500windows) (unknown) by unknown with SMTP; 8 May 2000 09:10:03 -0000 From: "Oscar Serrano" To: "Tom Lane" Cc: Subject: RE: postgres crash. HELP Date: Mon, 8 May 2000 11:11:54 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <18362.957716253@sss.pgh.pa.us> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 X-Archive-Number: 200005/69 > -----Mensaje original----- > De: pgsql-interfaces-owner@hub.org > [mailto:pgsql-interfaces-owner@hub.org]En nombre de Tom Lane > Enviado el: domingo, 07 de mayo de 2000 18:18 > Para: Oscar Serrano > CC: pgsql-interfaces@postgresql.org > Asunto: Re: [INTERFACES] postgres crash. HELP > > > "Oscar Serrano" writes: > > Suddenly in the directory where I have all the tables, now > there is about > > 1000 files with names like this: > > [ and a bunch of apparently-duplicated entries in system catalogs ] > > Looks pretty messy :-(. What version are you running? > > I hope you have a fairly recent pg_dumpall backup, because otherwise > you are likely to be in trouble. If the backup is new enough that you > can just restore from it without losing much, then I'd recommend just > initdb and restore. If you have newer data than what is in the backup, > but the schema is still the same, you could probably use pg_upgrade to > recover the system tables from the backup and then move your current > user data into the database. (It looks like the trouble is just in the > system tables, so your user tables are most likely OK.) I had a backup fortunately. I first had to make some pg_dump of some tables that were not corrupted and restore them later. I have postgres 6.5.3. I didn't know about pg_upgrade. I will have to read about it. Actually I have my dabatases open to every IP address, so anybody that enters our web page, and visits some of our applets, the connect via JDBC to our database. I think that during one of this connection, the postgres crashed. I'm going to stop using JDBC. Is there any known problem with the ODBC of the postgres? > If you want to try the pg_upgrade method, make sure you have the latest > pg_upgrade script (from 7.0RC5, current nightly snapshot, or direct from > CVS server) --- previous versions are known to have problems in > multi-user databases. Then, follow the man page's directions for > pg_upgrade, except don't bother trying to make a "pg_dumpall -s" dump > from your corrupted database; instead use your last good backup file > as the input script for pg_upgrade. > > regards, tom lane The problem was that I could not access the corrupted database for nothing. Neither could I do a SELECT nor a pg_dump. The fields of the index were also duplicated and that was generating more errors. I really think the data was there but the system databases where corrupted. Our schema don't change everyday so I'm going to do a backup of the system tables every day. Thank you very much.