Re: Postgresql: What can I do now? Fwd: Cron <postgres@giger> [ -x /usr/lib/postgresql/bin/do.maintenance ] && /usr/lib/postgresql/bin/do.maintenance -a
Daniel Migowski wrote:
>Hi,
>
>I receive regulary the following mail, but don't know, how to fix it.
>Someone knows the solution?
>NOTICE: Index pg_attribute_relid_attnum_index: NUMBER OF INDEX' TUPLES (461
>)
> IS NOT THE SAME AS HEAP' (503). Recreate the index.
You need to recreate that index on pg_attribute in the relevant database.
If you don't know which database it is, run VACUUM in each one to see which
ones give the message.
Stop the postmaster and start the postgres backend directly in standalone
mode. You don't want anyone else using the database while you're doing
the reindexing.
man drop_index
man create_index
It should be something like
CREATE UNIQUE INDEX pg_attribute_relid_attnum_index
ON pg_attribute (attrelid, attnum);
Use pg_dump to save your data first, in case of accidents.
You don't say which release of PostgreSQL this is. In release 7.0 the REINDEX
command is available:
man reindex
--
Oliver Elphick Oliver.Elphick@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"And now abideth faith, hope, love, these three; but
the greatest of these is love."
I Corinthians 13:13
Reply to: