From guillaume@eurovox.fr Thu Aug 22 10:31:58 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 487FB475EB6 for ; Thu, 22 Aug 2002 06:31:58 -0400 (EDT) Received: from deimos.eurovox.fr (unknown [195.68.105.205]) by postgresql.org (Postfix) with ESMTP id E6605475E1B for ; Thu, 22 Aug 2002 06:31:56 -0400 (EDT) Received: from guigui ([195.68.105.211]) by deimos.eurovox.fr (8.9.3/8.9.3) with SMTP id MAA28004 for ; Thu, 22 Aug 2002 12:29:23 +0200 Message-ID: <002101c249c5$cc166580$d36944c3@net> From: "Guillaume MARTIN" To: Subject: Vacuum failed ! Date: Thu, 22 Aug 2002 12:22:19 +0200 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_001D_01C249D6.8F4B4920" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/258 X-Sequence-Number: 5372 This is a multi-part message in MIME format. ------=_NextPart_000_001D_01C249D6.8F4B4920 Content-Type: multipart/alternative; boundary="----=_NextPart_001_001E_01C249D6.8F4B4920" ------=_NextPart_001_001E_01C249D6.8F4B4920 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Everyday I make a vacuum_db for one database Today, I made a vacuum but the following error occured : FATAL 2: open of /var/pgsql/data/pg_clog/0022 failed: No such file or dire= ctory server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. connection to server was lost vacuumdb: vacuum allopass_db failed What is it ?? I don't understand ... I stopped Postmaster and relaunched it ... but the error is still there ... I joined the complete Output of the vacuum process ( Output.txt ) In the pg_clog directory, i've got 6 files : 0025 0026 0027 0028 0029 002A ------=_NextPart_001_001E_01C249D6.8F4B4920 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Everyday I make a vacuum_db for one=20 database
 
Today, I made a vacuum but the follow= ing error=20 occured :
 
FATAL 2:  open of /var/pgsql/data/pg_= clog/0022=20 failed: No such file or directory
server closed the connection=20 unexpectedly
        This probably me= ans=20 the server terminated abnormally
      &nb= sp;=20 before or while processing the request.
connection to server was=20 lost
vacuumdb: vacuum  allopass_db failed
 
What is it ?? I don't understand ...
 
I stopped Postmaster and relaunched it ...=  but=20 the error is still there ...
 
I joined the complete Output of the vacuum= process=20 ( Output.txt )
 
In the pg_clog directory, i've got 6 files= =20 :
    0025
    0026
    0027
    0028
    0029
    002A
------=_NextPart_001_001E_01C249D6.8F4B4920-- ------=_NextPart_000_001D_01C249D6.8F4B4920 Content-Type: text/plain; name="Output.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="Output.txt" [root@aphrodite webadmin]# vacuumdb -v -z -p5229 allopass_db NOTICE: --Relation pg_type-- NOTICE: Pages 4: Changed 0, Empty 0; Tup 276: Vac 0, Keep 0, UnUsed 1. Total CPU 0.00s/0.00u sec elapsed 0.00 sec. NOTICE: Analyzing pg_type NOTICE: --Relation pg_attribute-- NOTICE: Pages 35: Changed 0, Empty 0; Tup 2639: Vac 0, Keep 0, UnUsed 16. Total CPU 0.00s/0.01u sec elapsed 0.00 sec. NOTICE: Analyzing pg_attribute NOTICE: --Relation pg_class-- NOTICE: Pages 11: Changed 0, Empty 0; Tup 302: Vac 0, Keep 0, UnUsed 378. Total CPU 0.00s/0.00u sec elapsed 0.00 sec. NOTICE: Analyzing pg_class NOTICE: --Relation pg_group-- NOTICE: Pages 0: Changed 0, Empty 0; Tup 0: Vac 0, Keep 0, UnUsed 0. Total CPU 0.00s/0.00u sec elapsed 0.00 sec. NOTICE: Analyzing pg_group NOTICE: --Relation pg_database-- NOTICE: Pages 1: Changed 0, Empty 0; Tup 5: Vac 0, Keep 0, UnUsed 0. Total CPU 0.00s/0.00u sec elapsed 0.00 sec. NOTICE: Analyzing pg_database NOTICE: --Relation pg_inherits-- NOTICE: Pages 0: Changed 0, Empty 0; Tup 0: Vac 0, Keep 0, UnUsed 0. Total CPU 0.00s/0.00u sec elapsed 0.00 sec. NOTICE: Analyzing pg_inherits NOTICE: --Relation pg_index-- NOTICE: Pages 3: Changed 0, Empty 0; Tup 115: Vac 0, Keep 0, UnUsed 0. Total CPU 0.00s/0.00u sec elapsed 0.00 sec. NOTICE: Analyzing pg_index NOTICE: --Relation pg_operator-- NOTICE: Pages 10: Changed 0, Empty 0; Tup 623: Vac 0, Keep 0, UnUsed 0. Total CPU 0.00s/0.00u sec elapsed 0.00 sec. NOTICE: Analyzing pg_operator NOTICE: --Relation pg_opclass-- NOTICE: Pages 1: Changed 0, Empty 0; Tup 51: Vac 0, Keep 0, UnUsed 0. Total CPU 0.00s/0.00u sec elapsed 0.00 sec. NOTICE: Analyzing pg_opclass NOTICE: --Relation pg_am-- NOTICE: Pages 1: Changed 0, Empty 0; Tup 4: Vac 0, Keep 0, UnUsed 0. Total CPU 0.00s/0.00u sec elapsed 0.00 sec. NOTICE: Analyzing pg_am NOTICE: --Relation pg_amop-- NOTICE: Pages 2: Changed 0, Empty 0; Tup 180: Vac 0, Keep 0, UnUsed 0. Total CPU 0.00s/0.00u sec elapsed 0.00 sec. NOTICE: Analyzing pg_amop NOTICE: --Relation pg_amproc-- NOTICE: Pages 1: Changed 0, Empty 0; Tup 57: Vac 0, Keep 0, UnUsed 0. Total CPU 0.00s/0.00u sec elapsed 0.00 sec. NOTICE: Analyzing pg_amproc NOTICE: --Relation pg_language-- NOTICE: Pages 1: Changed 0, Empty 0; Tup 3: Vac 0, Keep 0, UnUsed 0. Total CPU 0.00s/0.00u sec elapsed 0.00 sec. NOTICE: Analyzing pg_language NOTICE: --Relation pg_largeobject-- NOTICE: Pages 0: Changed 0, Empty 0; Tup 0: Vac 0, Keep 0, UnUsed 0. Total CPU 0.00s/0.00u sec elapsed 0.00 sec. NOTICE: Analyzing pg_largeobject NOTICE: --Relation pg_aggregate-- NOTICE: Pages 1: Changed 0, Empty 0; Tup 60: Vac 0, Keep 0, UnUsed 0. Total CPU 0.00s/0.00u sec elapsed 0.00 sec. NOTICE: Analyzing pg_aggregate NOTICE: --Relation pg_trigger-- NOTICE: Pages 4: Changed 0, Empty 0; Tup 140: Vac 0, Keep 0, UnUsed 0. Total CPU 0.00s/0.00u sec elapsed 0.00 sec. NOTICE: Analyzing pg_trigger NOTICE: --Relation pg_listener-- NOTICE: Pages 0: Changed 0, Empty 0; Tup 0: Vac 0, Keep 0, UnUsed 0. Total CPU 0.00s/0.00u sec elapsed 0.00 sec. NOTICE: Analyzing pg_listener NOTICE: --Relation pg_shadow-- NOTICE: Pages 1: Changed 0, Empty 0; Tup 3: Vac 0, Keep 0, UnUsed 0. Total CPU 0.00s/0.00u sec elapsed 0.00 sec. NOTICE: Analyzing pg_shadow NOTICE: --Relation pg_attrdef-- NOTICE: Pages 0: Changed 0, Empty 0; Tup 0: Vac 0, Keep 0, UnUsed 0. Total CPU 0.00s/0.00u sec elapsed 0.00 sec. NOTICE: --Relation pg_toast_16384-- NOTICE: Pages 0: Changed 0, Empty 0; Tup 0: Vac 0, Keep 0, UnUsed 0. Total CPU 0.00s/0.00u sec elapsed 0.00 sec. NOTICE: Analyzing pg_attrdef NOTICE: --Relation pg_description-- NOTICE: Pages 12: Changed 0, Empty 0; Tup 1303: Vac 0, Keep 0, UnUsed 0. Total CPU 0.00s/0.00u sec elapsed 0.00 sec. NOTICE: --Relation pg_toast_16416-- NOTICE: Pages 0: Changed 0, Empty 0; Tup 0: Vac 0, Keep 0, UnUsed 0. Total CPU 0.00s/0.00u sec elapsed 0.00 sec. NOTICE: Analyzing pg_description NOTICE: --Relation pg_proc-- NOTICE: Pages 31: Changed 0, Empty 0; Tup 1263: Vac 0, Keep 0, UnUsed 0. Total CPU 0.00s/0.00u sec elapsed 0.00 sec. NOTICE: --Relation pg_toast_1255-- NOTICE: Pages 0: Changed 0, Empty 0; Tup 0: Vac 0, Keep 0, UnUsed 0. Total CPU 0.00s/0.00u sec elapsed 0.00 sec. NOTICE: Analyzing pg_proc NOTICE: --Relation pg_relcheck-- NOTICE: Pages 0: Changed 0, Empty 0; Tup 0: Vac 0, Keep 0, UnUsed 0. Total CPU 0.00s/0.00u sec elapsed 0.00 sec. NOTICE: --Relation pg_toast_16386-- NOTICE: Pages 0: Changed 0, Empty 0; Tup 0: Vac 0, Keep 0, UnUsed 0. Total CPU 0.00s/0.00u sec elapsed 0.00 sec. NOTICE: Analyzing pg_relcheck NOTICE: --Relation pg_rewrite-- NOTICE: Pages 4: Changed 0, Empty 0; Tup 23: Vac 0, Keep 0, UnUsed 0. Total CPU 0.00s/0.00u sec elapsed 0.00 sec. NOTICE: --Relation pg_toast_16410-- NOTICE: Pages 2: Changed 0, Empty 0; Tup 5: Vac 0, Keep 0, UnUsed 0. Total CPU 0.00s/0.00u sec elapsed 0.00 sec. NOTICE: Analyzing pg_rewrite NOTICE: --Relation pg_statistic-- FATAL 2: open of /var/pgsql/data/pg_clog/0022 failed: No such file or dire= ctory server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. connection to server was lost vacuumdb: vacuum allopass_db failed [root@aphrodite webadmin]# ------=_NextPart_000_001D_01C249D6.8F4B4920-- From tgl@sss.pgh.pa.us Thu Aug 22 14:10:27 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id F11B54759A1 for ; Thu, 22 Aug 2002 10:10:27 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id DE71547545C for ; Thu, 22 Aug 2002 10:10:26 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g7MEAEZM018192; Thu, 22 Aug 2002 10:10:18 -0400 (EDT) To: "Guillaume MARTIN" Cc: pgsql-admin@postgresql.org Subject: Re: Vacuum failed ! In-reply-to: <002101c249c5$cc166580$d36944c3@net> References: <002101c249c5$cc166580$d36944c3@net> Comments: In-reply-to "Guillaume MARTIN" message dated "Thu, 22 Aug 2002 12:22:19 +0200" Date: Thu, 22 Aug 2002 10:10:14 -0400 Message-ID: <18191.1030025414@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/262 X-Sequence-Number: 5376 "Guillaume MARTIN" writes: > Today, I made a vacuum but the following error occured : > FATAL 2: open of /var/pgsql/data/pg_clog/0022 failed: No such file or dire= > ctory Hm, what PG version is this exactly? 7.2 or 7.2.1? > In the pg_clog directory, i've got 6 files : > 0025 > 0026 > 0027 > 0028 > 0029 > 002A What you seem to have here is an unvacuumed reference to an old transaction number. If you've been vacuuming this database regularly then I'm not sure how that could have happened. There is a post-7.2.1 clog bug fix that could cause premature removal of clog segments, but it could only trigger after you've had more than 2 billion transactions which you evidently haven't. Fortunately, the problem seems to be in pg_statistic which is surely non-critical data. I'd suggest a quick "DELETE FROM pg_statistic" and then try to VACUUM pg_statistic. (If that doesn't work, you'll have to try "TRUNCATE pg_statistic" instead but the delete would be safer.) Once you can vacuum pg_statistic, a database-wide ANALYZE will rebuild its contents. regards, tom lane From guillaume@eurovox.fr Fri Aug 23 09:37:20 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id D150E4759DF for ; Fri, 23 Aug 2002 05:37:20 -0400 (EDT) Received: from deimos.eurovox.fr (unknown [195.68.105.205]) by postgresql.org (Postfix) with ESMTP id 9A82A474E49 for ; Fri, 23 Aug 2002 05:37:19 -0400 (EDT) Received: from guigui ([195.68.105.211]) by deimos.eurovox.fr (8.9.3/8.9.3) with SMTP id LAA05984; Fri, 23 Aug 2002 11:34:40 +0200 Message-ID: <001f01c24a88$702b78a0$d36944c3@net> From: "Guillaume MARTIN" To: "Tom Lane" Cc: References: <002101c249c5$cc166580$d36944c3@net> <18191.1030025414@sss.pgh.pa.us> Subject: Re: Vacuum failed ! Date: Fri, 23 Aug 2002 11:35:36 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/272 X-Sequence-Number: 5386 I've got the 7.2 ... i tried the truncate and delete ... I had the following : allopass_db=# DELETE FROM pg_statistic ; FATAL 2: open of /var/pgsql/data/pg_clog/0022 failed: No such file or directory server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. The connection to the server was lost. Attempting reset: Failed. !# <--- here I lost the connection ! allopass_db=# TRUNCATE pg_statistic ; ERROR: TRUNCATE cannot be used on system tables. 'pg_statistic' is a system table allopass_db=# ----- Original Message ----- From: Tom Lane To: Guillaume MARTIN Cc: Sent: Thursday, August 22, 2002 4:10 PM Subject: Re: [ADMIN] Vacuum failed ! > "Guillaume MARTIN" writes: > > Today, I made a vacuum but the following error occured : > > > FATAL 2: open of /var/pgsql/data/pg_clog/0022 failed: No such file or dire= > > ctory > > Hm, what PG version is this exactly? 7.2 or 7.2.1? > > > In the pg_clog directory, i've got 6 files : > > 0025 > > 0026 > > 0027 > > 0028 > > 0029 > > 002A > > What you seem to have here is an unvacuumed reference to an old > transaction number. If you've been vacuuming this database regularly > then I'm not sure how that could have happened. There is a post-7.2.1 > clog bug fix that could cause premature removal of clog segments, but > it could only trigger after you've had more than 2 billion transactions > which you evidently haven't. > > Fortunately, the problem seems to be in pg_statistic which is surely > non-critical data. I'd suggest a quick "DELETE FROM pg_statistic" > and then try to VACUUM pg_statistic. (If that doesn't work, you'll > have to try "TRUNCATE pg_statistic" instead but the delete would be > safer.) Once you can vacuum pg_statistic, a database-wide ANALYZE > will rebuild its contents. > > regards, tom lane > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org > From tgl@sss.pgh.pa.us Fri Aug 23 13:28:07 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 77284475B40 for ; Fri, 23 Aug 2002 09:28:07 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id BD2C04759DF for ; Fri, 23 Aug 2002 09:28:06 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g7NDS8ZM019426; Fri, 23 Aug 2002 09:28:08 -0400 (EDT) To: "Guillaume MARTIN" Cc: pgsql-admin@postgresql.org Subject: Re: Vacuum failed ! In-reply-to: <001f01c24a88$702b78a0$d36944c3@net> References: <002101c249c5$cc166580$d36944c3@net> <18191.1030025414@sss.pgh.pa.us> <001f01c24a88$702b78a0$d36944c3@net> Comments: In-reply-to "Guillaume MARTIN" message dated "Fri, 23 Aug 2002 11:35:36 +0200" Date: Fri, 23 Aug 2002 09:28:07 -0400 Message-ID: <19425.1030109287@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/275 X-Sequence-Number: 5389 "Guillaume MARTIN" writes: > i tried the truncate and delete ... I had the following : > allopass_db=# DELETE FROM pg_statistic ; > FATAL 2: open of /var/pgsql/data/pg_clog/0022 failed: No such file or > directory I was afraid that wouldn't work, but it was worth a try. > allopass_db=# TRUNCATE pg_statistic ; > ERROR: TRUNCATE cannot be used on system tables. 'pg_statistic' is a system > table You need to do the TRUNCATE in a standalone backend with -O -P switches. This is basically the same procedure as for REINDEXing a system table; see the REINDEX man page for details. regards, tom lane