Re: loading pg_description ... FATAL: duplicate key violates - Mailing list pgsql-general

From Richard Huxton
Subject Re: loading pg_description ... FATAL: duplicate key violates
Date
Msg-id 43E9C208.7080705@archonet.com
Whole thread Raw
In response to loading pg_description ... FATAL: duplicate key violates unique constraint "pg_description_o_c_o_index"  ("surabhi.ahuja" <surabhi.ahuja@iiitb.ac.in>)
List 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

pgsql-general by date:

Previous
From: "surabhi.ahuja"
Date:
Subject: loading pg_description ... FATAL: duplicate key violates unique constraint "pg_description_o_c_o_index"
Next
From: Stephan Vollmer
Date:
Subject: Re: Error: "could not read from statistics collector pipe"