Re: URGENT: Index problems - Mailing list pgsql-general

From Steve Brett
Subject Re: URGENT: Index problems
Date
Msg-id 9qjill$4tr$1@news.tht.net
Whole thread Raw
In response to URGENT: Index problems  ("Steve Brett" <steve.brett@e-mis.com>)
List 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.brett@e-mis.com> wrote in message
news:9qjgpp$3h3$1@news.tht.net...
> 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
>
>



pgsql-general by date:

Previous
From: Mayan
Date:
Subject: C++ Examples
Next
From: huongch@bigfoot.com (Flancer)
Date:
Subject: To Postgres Devs : Wouldn't changing the select limit syntax ....