Re: loading pg_description ... FATAL: duplicate key violates

From: Richard Huxton <dev(at)archonet(dot)com>
To: "surabhi(dot)ahuja" <surabhi(dot)ahuja(at)iiitb(dot)ac(dot)in>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: loading pg_description ... FATAL: duplicate key violates
Date: 2006-02-08 10:03:52
Message-ID: 43E9C208.7080705@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

surabhi.ahuja wrote:
> i am trying to install postgresql-8.0.1

Why? The most recent release for 8.0 is 8.0.6 and you're clearly
compiling from source, so why have you deliberately chosen an old release?

> i am now trying to do
> /usr/local/pgsql/bin/initdb -D data/

I'd specify an absolute path here myself: -D /usr/local/pgsql/data

> however this is what i get:
>
> The files belonging to this database system will be owned by user "surabi".

OK - you've chosen to override the default user of "postgres",
presumably you know what you're doing.

> This user must also own the server process.
[snip]
> creating system views ... ok
> loading pg_description ... FATAL: duplicate key violates unique constraint "pg_description_o_c_o_index"
> child process exited with exit code 1
> initdb: removing contents of data directory "data"

Well - the error says what the problem is, somehow the pg_description
table is being loaded with duplicate rows. The primary-key is stopping
this form happening (good).

At a guess, this is due to one of three things:
1. You have two versions of the postgresql source and somehow bits are
getting mixed up.
2. You have made alterations to the source-code and duplicated an OID
already in use somewhere
3. You somehow have a non-release or development version of the code
from CVS which had a bug in it at the second you downloaded it.

In any case, I'd recommend deleting your existing source tree (and all
of /usr/local/pgsql), download 8.0.6 and run a new ./configure; make;
make install cycle.

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Vollmer 2006-02-08 10:13:42 Re: Error: "could not read from statistics collector pipe"
Previous Message surabhi.ahuja 2006-02-08 09:44:56 loading pg_description ... FATAL: duplicate key violates unique constraint "pg_description_o_c_o_index"