Opened 8 years ago

Closed 8 years ago

#3443 closed defect (fixed)

PostGIS dump/restore fails with duplicate key in spatial_ref_sys

Reported by: strk Owned by: strk
Priority: blocker Milestone: PostGIS 2.2.2
Component: build Version: 2.2.x
Keywords: Cc:

Description

Dumping and restoring a database after CREATE EXTENSION POSTGIS fails with this:

pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 3174; 0 51657944 TABLE DATA spatial_ref_sys strk
pg_restore: [archiver (db)] COPY failed for table "spatial_ref_sys": ERROR:  duplicate key value violates unique constraint "spatial_ref_sys_pkey"
DETAIL:  Key (srid)=(7041) already exists.
CONTEXT:  COPY spatial_ref_sys, line 1

Change History (11)

comment:1 by strk, 8 years ago

Component: postgisbuild/upgrade/install
Owner: changed from pramsey to strk

comment:2 by strk, 8 years ago

Same happens with trunk (2.3.0dev). 2.1.9dev is fine. Robe, I guess this is for you ? (or for Paul, as it might be due to spatial_ref_sys update)

comment:3 by strk, 8 years ago

Owner: changed from strk to pramsey

This was definitely introduced by updating spatial_ref_sys as it doesn't happen before r14598 (see #3427)

comment:4 by strk, 8 years ago

(In [14619]) Automatically generate system_ref_sys config dump for extension

See #3443

comment:5 by strk, 8 years ago

Resolution: fixed
Status: newclosed

(In [14620]) Automatically generate system_ref_sys config dump for extension

Fixes #3443

comment:6 by strk, 8 years ago

Resolution: fixed
Status: closedreopened

NOTE: I'm not sure 2.2.2dev was affected as I realized I was always using trunk instead. Anyway the automation should be good in any case.

comment:7 by strk, 8 years ago

Owner: changed from pramsey to strk
Status: reopenednew

comment:8 by strk, 8 years ago

Resolution: fixed
Status: newclosed

comment:9 by strk, 8 years ago

Resolution: fixed
Status: closedreopened

Reopening as I just realized the automatically created spatial_ref_sys_dump was created empty by the commits.

comment:10 by strk, 8 years ago

(In [14649]) Really generate system_ref_sys config dump for extension

See #3443

comment:11 by strk, 8 years ago

Resolution: fixed
Status: reopenedclosed

(In [14650]) Really generate system_ref_sys config dump for extension

Closes #3443

Note: See TracTickets for help on using tickets.