pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Vacuum failed !
4+ messages / 2 participants
[nested] [flat]

* Vacuum failed !
@ 2002-08-22 10:22  Guillaume MARTIN <guillaume@eurovox.fr>
  0 siblings, 1 reply; 4+ messages in thread

From: Guillaume MARTIN @ 2002-08-22 10:22 UTC (permalink / raw)
  To: pgsql-admin

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 directory
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

Attachments:

Output.txt (text/plain, 5.4K) download [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 directory 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]#
^ permalink raw reply [nested|flat] 4+ messages in thread

* Re: Vacuum failed !
@ 2002-08-22 14:10  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Guillaume MARTIN <guillaume@eurovox.fr>
  0 siblings, 1 reply; 4+ messages in thread

From: Tom Lane @ 2002-08-22 14:10 UTC (permalink / raw)
  To: Guillaume MARTIN <guillaume@eurovox.fr>; +Cc: pgsql-admin

"Guillaume MARTIN" <guillaume@eurovox.fr> 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



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Vacuum failed !
@ 2002-08-23 09:35  Guillaume MARTIN <guillaume@eurovox.fr>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 4+ messages in thread

From: Guillaume MARTIN @ 2002-08-23 09:35 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin

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 <tgl@sss.pgh.pa.us>
To: Guillaume MARTIN <guillaume@eurovox.fr>
Cc: <pgsql-admin@postgresql.org>
Sent: Thursday, August 22, 2002 4:10 PM
Subject: Re: [ADMIN] Vacuum failed !


> "Guillaume MARTIN" <guillaume@eurovox.fr> 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
>





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Vacuum failed !
@ 2002-08-23 13:28  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Guillaume MARTIN <guillaume@eurovox.fr>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2002-08-23 13:28 UTC (permalink / raw)
  To: Guillaume MARTIN <guillaume@eurovox.fr>; +Cc: pgsql-admin

"Guillaume MARTIN" <guillaume@eurovox.fr> 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



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2002-08-23 13:28 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-08-22 10:22 Vacuum failed ! Guillaume MARTIN <guillaume@eurovox.fr>
2002-08-22 14:10 ` Tom Lane <tgl@sss.pgh.pa.us>
2002-08-23 09:35   ` Guillaume MARTIN <guillaume@eurovox.fr>
2002-08-23 13:28     ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox