X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 57FA89DC9A8 for ; Tue, 27 Dec 2005 03:05:52 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 92574-01-2 for ; Tue, 27 Dec 2005 03:05:48 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.198]) by postgresql.org (Postfix) with ESMTP id 56B2F9DCA64 for ; Tue, 27 Dec 2005 03:05:42 -0400 (AST) Received: by zproxy.gmail.com with SMTP id 13so1322493nzn for ; Mon, 26 Dec 2005 23:05:43 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=mXwrs4owIcNY2mEVxPzm5//RzIS7pDdjgGZWhif1Af4bAYNcwLBczhaWeu+a/5cwJrJch7eabj3I7iexd4rPxgvZaHtO/G2Fz/JaenOAVWUZX5cQt7nbdM47cBpYzoR4JMOGYJoXX/VAPDT832Pc7qGAR4uzf34ZSWxMgNV3nPk= Received: by 10.36.79.16 with SMTP id c16mr4013688nzb; Mon, 26 Dec 2005 23:05:43 -0800 (PST) Received: by 10.36.72.7 with HTTP; Mon, 26 Dec 2005 23:05:43 -0800 (PST) Message-ID: <674d1f8a0512262305g3e2bfb81t420482ea981b6e14@mail.gmail.com> Date: Tue, 27 Dec 2005 12:35:43 +0530 From: Gourish Singbal To: Tom Lane Subject: Re: vacuuming template0 gave ERROR Cc: "pgsql-admin@postgresql.org" In-Reply-To: <9822.1135612972@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5483_23357891.1135667143464" References: <674d1f8a0512260334g3b72c635m7d46ab457a8f2694@mail.gmail.com> <9822.1135612972@sss.pgh.pa.us> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.149 required=5 tests=[AWL=0.148, HTML_MESSAGE=0.001] X-Spam-Score: 0.149 X-Spam-Level: X-Archive-Number: 200512/313 X-Sequence-Number: 20033 ------=_Part_5483_23357891.1135667143464 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Tom, I got the followign Erorr when i tried to trucate the table. /usr/local/pgsql/bin/postgres -D data -O -o standalone_log template0 2005-12-26 22:48:12 ERROR: expected one dependency record for TOAST table, found 0 2005-12-26 22:48:31 ERROR: could not access status of transaction 1107341112 DETAIL: could not open file "/home/postgres/data/pg_clog/0420": No such file or directory 2005-12-26 22:48:41 LOG: shutting down 2005-12-26 22:48:41 LOG: database system is shut down please suggest ?. On 12/26/05, Tom Lane wrote: > > Gourish Singbal writes: > > Got the following ERROR when i was vacuuming the template0 database. > > Why were you doing that in the first place? template0 shouldn't ever > be touched. > > > postgresql server version is 7.4.5 > > The underlying cause is likely related to this 7.4.6 bug fix: > > 2004-10-13 18:22 tgl > > * contrib/pgstattuple/pgstattuple.c, > src/backend/access/heap/heapam.c, > src/backend/utils/adt/ri_triggers.c (REL7_4_STABLE): Repair > possible failure to update hint bits back to disk, per > http://archives.postgresql.org/pgsql-hackers/2004-10/msg00464.php. > I plan a more permanent fix in HEAD, but for the back branches it > seems best to just touch the places that actually have a problem. > > > > INFO: vacuuming "pg_catalog.pg_statistic" > > ERROR: could not access status of transaction 1107341112 > > DETAIL: could not open file "/home/postgres/data/pg_clog/0420": No suc= h > > file or directory > > Fortunately for you, pg_statistic doesn't contain any irreplaceable > data. So you could get out of this via > > TRUNCATE pg_statistic; > VACUUM ANALYZE; -- rebuild contents of pg_statistic > VACUUM FREEZE; -- make sure template0 needs no further vacuuming > > Then reset template0's datallowconn to false, and get rid of that code > to override it. And then update to a more recent release ;-) > > (I don't recall exactly what rules 7.4 uses, but likely you'll find that > you need to run a standalone backend with -O switch to perform > TRUNCATE on a system catalog.) > > regards, tom lane > -- Best, Gourish Singbal ------=_Part_5483_23357891.1135667143464 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
 
Tom,
I got the followign Erorr when i tried to trucate the table.
 /usr/local/pgsql/bin/postgres -D data -O -o standalone_log templ= ate0
 
2005-12-26 22:48:12 ERROR:  expected one dependency record for TO= AST table, found 0
2005-12-26 22:48:31 ERROR:  could not access sta= tus of transaction 1107341112
DETAIL:  could not open file "/h= ome/postgres/data/pg_clog/0420": No such file or directory
2005-12-26 22:48:41 LOG:  shutting down
2005-12-26 22:48:41 LOG= :  database system is shut down

please suggest ?.
 
On 12/26/05, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Gourish Singbal <gourish@gmail.com> writes:
> Got the = following ERROR when i was vacuuming the template0 database.

Why were you doing that in the first place?  template0 sh= ouldn't ever
be touched.

> postgresql server version is 7.4.5<= br>
The underlying cause is likely related to this 7.4.6 bug fix:
2004-10-13 18:22  tgl

       * contrib/pgstattuple/pgstattu= ple.c,
       src/backend/access/heap/heap= am.c,
       src/backend/utils/adt/ri_trig= gers.c (REL7_4_STABLE): Repair
       poss= ible failure to update hint bits back to disk, per
       http://archives.postgresql.org/= pgsql-hackers/2004-10/msg00464.php.
     &n= bsp; I plan a more permanent fix in HEAD, but for the back branches it
       seems best to just touch the place= s that actually have a problem.


> INFO:  vacuuming = "pg_catalog.pg_statistic"
> ERROR:  could not acc= ess status of transaction 1107341112
> DETAIL:  could not o= pen file "/home/postgres/data/pg_clog/0420": No such
> file or directory

Fortunately for you, pg_statistic doesn't= contain any irreplaceable
data.  So you could get out of this= via

       TRUNCATE pg_statistic;
=        VACUUM ANALYZE;  -- rebuild = contents of pg_statistic
       VACUUM FREEZE;   -- make= sure template0 needs no further vacuuming

Then reset template0's da= tallowconn to false, and get rid of that code
to override it.  = ;And then update to a more recent release ;-)

(I don't recall exactly what rules 7.4 uses, but likely you'll find tha= t
you need to run a standalone backend with -O switch to perform
TRUN= CATE on a system catalog.)

       = ;            &n= bsp;   regards, tom lane



--
Best,
Gourish Si= ngbal=20 ------=_Part_5483_23357891.1135667143464--