Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 80593475BE1 for ; Sun, 9 Jun 2002 16:02:16 -0400 (EDT) Received: from aurora.regenstrief.org (aurora.regenstrief.org [134.68.31.122]) by postgresql.org (Postfix) with ESMTP id 1D7B3475A92 for ; Sun, 9 Jun 2002 16:02:11 -0400 (EDT) Received: from aurora.regenstrief.org (dialup-64.157.19.124.Dial1.Cincinnati1.Level3.net [64.157.19.124]) by aurora.regenstrief.org (8.11.6/8.9.3) with ESMTP id g59K2cO64874; Sun, 9 Jun 2002 15:02:39 -0500 (EST) (envelope-from gunther@aurora.regenstrief.org) Message-ID: <3D03B426.6070900@aurora.regenstrief.org> Date: Sun, 09 Jun 2002 15:01:42 -0500 From: Gunther Schadow Organization: Regenstrief Institute for Health Care User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2 X-Accept-Language: en-us MIME-Version: 1.0 To: Ian Cass Cc: pgsql-sql@postgresql.org Subject: Re: select failure References: <083e01c20e29$7c99fdf0$6602a8c0@salamander> <3D039A2C.5000906@aurora.regenstrief.org> <001501c20fe7$a92436a0$1af11f3e@xenon> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Archive-Number: 200206/99 X-Sequence-Number: 8064 Ian Cass wrote: > Debian apt-get installed 7.2.1. No I don't have ppl deleting files. > > What do I need to do to fix it? > > Worst case, I can probably remove the table and rebuild it. Although it > contains about 27million rows and will take 2 or 3 days to rebuild. > > Thing is, how did it happen and is it likely to happen again? I don't know. But something is really in very bad shape. I suggest you backtrack one minor version to 7.2. Rebuilding the entire thing is what I would do. However, I don't really undestand what that pg_clog subdirectory is. In 2.7 that I use I recall that all data is in the data/base directory just as it was since time began. If I ever had a file vanish from there I would definitely completely rebuild the database (from backups if any or from scratch.) Rebuilding 27million rows shouldn't take 2 or 3 days. Are you sure you do a COPY ... FROM instead of individual INSERTs? Also you may consider turning off indexes and deferring foreign key triggers. However, I don't need to do this to load a similar sized database overnight. YMMV, depends on machine speed too, of course. Good luck, and beware, I'm not really the pgsql geek who really understands your error. I just use common sense, so, don't take my word for gold w/r/t the recommendation to backtrack version and rebuild. regards, -Gunther > > -- > Ian Cass > > ----- Original Message ----- > From: "Gunther Schadow" > To: "Ian Cass" > Cc: > Sent: Sunday, June 09, 2002 7:10 PM > Subject: Re: [SQL] select failure > > > >>Ian Cass wrote: >> >> >>>Ideas where I should look for the answer to this problem & how I should >>> > fix > >>>it? >>> >>>observer=# select host, current_route, count(current_route) >>>observer-# from messages_200205 >>>observer-# group by host, current_route; >>>FATAL 2: open of /var/lib/postgres/data/pg_clog/0534 failed: No such >>> > file > >>>or directory >>> >> >>OUCH! that looks quite bad. It's a postgresql internal error. >>What version of PostgreSQL do you run? Is this some beta version? >>Or do you have someone deleting files randomly? >> >>regards, >>-Gunther >> >> >> >>-- >>Gunther Schadow, M.D., Ph.D. gschadow@regenstrief.org >>Medical Information Scientist Regenstrief Institute for Health Care >>Adjunct Assistant Professor Indiana University School of Medicine >>tel:1(317)630-7960 http://aurora.regenstrief.org >> >> >> >>---------------------------(end of broadcast)--------------------------- >>TIP 2: you can get off all lists at once with the unregister command >> (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) >> >> -- Gunther Schadow, M.D., Ph.D. gschadow@regenstrief.org Medical Information Scientist Regenstrief Institute for Health Care Adjunct Assistant Professor Indiana University School of Medicine tel:1(317)630-7960 http://aurora.regenstrief.org