Creating indeces on existing tables...

From: "Steve Wolfe" <steve(at)iboats(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Creating indeces on existing tables...
Date: 2001-01-31 20:51:48
Message-ID: 025101c08bc7$a379dfc0$50824e40@iboats.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


OK, one of my tables was getting duplicate entries, and I thought I'd
create a unique index on a particular field. So, I created the index:

domains=# create unique index idx_domain_name on domain (domain_name);
CREATE

Then, tried a vaccum:

domains=# vacuum analyze;
NOTICE: Index idx_domain_name: NUMBER OF INDEX' TUPLES (305) IS NOT THE
SAME AS HEAP' (311).
Recreate the index.
VACUUM

Huh? So, I dropped the index, did a vacuum analyze, recreated the index,
tried a vacuum, same thing.

So, I did a pg_dump, edited the dump file to create the index with the
table, and dropped/restored the database. It worked, but I'm puzzled why
the origianal attempt didn't work. It's Postgres 7.0.2.

steve

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Raymond Chui 2001-01-31 20:54:18 Unrecognized language plpgsql when CREATE FUNCTION?!
Previous Message Michael Dunn 2001-01-31 20:33:50 Obtaining nTuples from a cursor