From: | Palle Girgensohn <girgen(at)partitur(dot)se> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Patrik Kudo <kudo(at)partitur(dot)se>, "pgsql-sql(at)postgreSQL(dot)org" <pgsql-sql(at)postgreSQL(dot)org> |
Subject: | Re: [SQL] Duplicate tuples with unique index |
Date: | 2000-01-26 00:31:42 |
Message-ID: | 388E406E.D591309E@partitur.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Bruce Momjian wrote:
>
> > Palle Girgensohn <girgen(at)partitur(dot)se> writes:
> > > Unfotunately, it doesn't quite work:
> >
> > > pp=> vacuum analyze;
> > > NOTICE: Rel pg_statistic: TID 1/93: OID IS INVALID. TUPGONE 0.
> > > VACUUM
> > > pp=> delete from pg_statistic;
> > > ERROR: heap_delete: (am)invalid tid
> >
> > Ugh. Yup, your pg_statistic table is corrupted all right.
> >
> > What you may have to do is pg_dump that database, destroydb/createdb,
> > and reload.
> >
> > I have a possible shortcut for you, but I *strongly* suggest that you
> > pg_dump first in case it doesn't work! After making your backup dump,
> > stop the postmaster and truncate the broken database's pg_statistic
> > file to zero length:
> > cp /dev/null .../data/base/yourdb/pg_statistic
> > Then restart the postmaster and see if you can vacuum analyze the
> > broken database. If so, you are good to go; if not, it's time to
> > reload that database.
> >
>
> Running pg_upgrade is another option.
Nope. pg_upgrade was "disabled in this release because the internal blahblahblah disk layout changed from previous versions". cat /dev/null > pg_statistic didn't help, and the file was already zero
bytes long.
Applied the patches to vacuum.c and hio.c, and pg_dumpall && initdb && psql < dump.sql fixed it.
Thanks for your support!
/Palle
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2000-01-26 00:33:52 | Re: [SQL] Duplicate tuples with unique index |
Previous Message | Palle Girgensohn | 2000-01-26 00:26:58 | Re: [SQL] Problem with large tuples. |