Re: URGENT: Index problems

From: "Steve Brett" <steve(dot)brett(at)e-mis(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: URGENT: Index problems
Date: 2001-10-17 09:20:05
Message-ID: 9qjill$4tr$1@news.tht.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

apparently this is the fix:

psql -d mydb -c "select * from title;" > before
# Save for after cmp test...
cd /usr/local/pgsql # my install root...
vacuumdb mydb # clean up before moving...
cp -pr data data.backup # make a backup...
pg_dumpall -s > schema.sql # dump schema w/out data...
killall postmaster # stop the server...
sleep 3
mv data data.old # set it aside...
cd /usr/src/pgsql/src # to the src tree...
gmake install # reinstall binaries...
cd /usr/local/pgsql # back to my install root...
initdb # recreate template1, sys
stuff...
postmaster -i -o "-F -S 4096 -s" >& log & # restart server...
sleep 3
pg_upgrade -f schema.sql data >& upgrade.log # reload schema...
cp -p data.old/base/mydb/* data/base/mydb/ # replace data...
psql -d mydb -c "select * from title;" > after
# verify we still have data...
diff before after # quick sanity check...

will let you know if it works ...
"Steve Brett" <steve(dot)brett(at)e-mis(dot)com> wrote in message
news:9qjgpp$3h3$1(at)news(dot)tht(dot)net(dot)(dot)(dot)
> I added a hash index to a varchar value and when i vacuumed i got the
> following error:
>
> Index customer_ha_hash: NUMBER OF INDEX' TUPLES (9176) IS NOT THE SAME AS
> HEAP' (9181).
>
> dropping and recreating the index gave me the same error (on this index
> only)
>
> dropping the database and reimporting the data and then recreating the
index
> and vacuuming gave me the same error.
>
> any ideas ? ... and does anyone know what the error means ?
>
> thanks in advance.
>
> Steve
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Allan Engelhardt 2001-10-17 09:25:30 Re: postgresql 7.1.3
Previous Message Steve Brett 2001-10-17 08:48:09 URGENT: Index problems