Re: loading pg_description ... FATAL: duplicate key violates unique constraint "pg_description_o_c_o_index" - Mailing list pgsql-general

From surabhi.ahuja
Subject Re: loading pg_description ... FATAL: duplicate key violates unique constraint "pg_description_o_c_o_index"
Date
Msg-id 967CFC4343BF2A4DAFACD026D33DC85118ECB9@jal.iiitb.ac.in
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>)
Responses Re: loading pg_description ... FATAL: duplicate key violates  (Richard Huxton <dev@archonet.com>)
List pgsql-general
actually
 
i had a version existing earlier. guess it was installed from an rpm..
so ther are binaries like postmaster inside /usr/bin itself
 
and after i installed /8.0.1, ther are binaries even in /usr/local/pgsql/bin.
 
how should i uninstall the whole thing and begin a fresh instaallation of 8.0.6.
 
i ll delete the directory postgresql-8.0.1
 
and i shall also remove usr/local/pgsql
 
now how shd i uninstall that rpm so that the binaries in /usr/bin also get removed
thanks,
regards
Surabhi
 


From: Richard Huxton [mailto:dev@archonet.com]
Sent: Wed 2/8/2006 3:33 PM
To: surabhi.ahuja
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] loading pg_description ... FATAL: duplicate key violates unique constraint "pg_description_o_c_o_index"

***********************
Your mail has been scanned by iiitb VirusWall.
***********-***********


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: Tareq Tajkeh
Date:
Subject: Postgre replication/clustering on 7.4 and RHEL AS 4
Next
From: Richard Huxton
Date:
Subject: Re: loading pg_description ... FATAL: duplicate key violates