Re: Backup Restore

From: Bob Pawley <rjpawley(at)shaw(dot)ca>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: Dave Page <dpage(at)postgresql(dot)org>, Shoaib Mir <shoaibmir(at)gmail(dot)com>, Postgresql <pgsql-general(at)postgresql(dot)org>
Subject: Re: Backup Restore
Date: 2007-01-03 18:07:50
Message-ID: 009d01c72f62$14e98fe0$8e904618@owner
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Looking through PGAdmin where would I find the spatial references that the
errror message references?

Bob

----- Original Message -----
From: "Richard Huxton" <dev(at)archonet(dot)com>
To: "Bob Pawley" <rjpawley(at)shaw(dot)ca>
Cc: "Dave Page" <dpage(at)postgresql(dot)org>; "Shoaib Mir" <shoaibmir(at)gmail(dot)com>;
"Postgresql" <pgsql-general(at)postgresql(dot)org>
Sent: Tuesday, January 02, 2007 2:00 AM
Subject: Re: [GENERAL] Backup Restore

> Bob Pawley wrote:
>> Following is the error message on pg_restore:-
>>
>> "pg_restore: ERROR: duplicate key violates unique constraint
>> "spatial_ref_sys_pkey"
>> CONTEXT: COPY spatial_ref_sys, line 1: "2000 EPSG 2000 PROJCS["Anguilla
>> 1957 / British West Indies Grid",GEOGCS["Anguilla 1957",DATUM["Angui..."
>> pg_restore: [archiver (db)] error returned by PQendcopy: ERROR:
>> duplicate key violates unique constraint "spatial_ref_sys_pkey"
>> CONTEXT: COPY spatial_ref_sys, line 1: "2000 EPSG 2000 PROJCS["Anguilla
>> 1957 / British West Indies Grid",GEOGCS["Anguilla 1957",DATUM["Angui..."
>> pg_restore: *** aborted because of error
>>
>> Process returned exit code 1."
>>
>> The GIS feature was removed from the PostgreSQL application before the
>> project dump.
>
> Not sure what you mean by that - you removed all GIS related types and
> functions from the source database?
>
>> Anyone have any thoughts on how to get around this??
>
> Remove the constraint if you no longer have that requirement. It looks
> like you have a primary-key defined on spatial_ref_sys and want to remove
> it. See the SQL Reference section of the manuals for how to use ALTER
> TABLE to drop primary keys and other constraints.
>
> I'm curious as to how this can happen though. Are the definitions of table
> spatial_ref_sys the same in the source and target database?
>
> --
> Richard Huxton
> Archonet Ltd
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2007-01-03 18:44:47 Re: Backup Restore
Previous Message Enrico 2007-01-03 17:27:09 Re: Index Scanning