[postgis-devel] [PostGIS] #1834: revise postgis extension to only backup user specified spatial_ref_sys

PostGIS trac at osgeo.org
Tue May 22 04:43:37 PDT 2012


#1834: revise postgis extension to only backup user specified spatial_ref_sys
-----------------------------------+----------------------------------------
 Reporter:  robe                   |       Owner:  robe         
     Type:  defect                 |      Status:  new          
 Priority:  medium                 |   Milestone:  PostGIS 2.0.1
Component:  build/upgrade/install  |     Version:  2.0.x        
 Keywords:                         |  
-----------------------------------+----------------------------------------
 right now if you install postgis as an extension and then do a full backup
 of your database, it backs up all spatial_ref_sys.  It should only backup
 user created ones so you don't get a primary key conflict when you reload
 your data.

 As a hacky solution until we figure out how to do #1831, I'm just going to
 change the configuration to expliclitly list out the ranges we have.  It's
 not ideal but the easiest backward compatibility wise to do at the moment.

 So essentially the extension part that reads:

 {{{
 SELECT pg_catalog.pg_extension_config_dump('spatial_ref_sys', '');
 }}}

 Will be changed to


 {{{
 SELECT pg_catalog.pg_extension_config_dump('spatial_ref_sys', 'srid NOT
 BETWEEN a1 and b1 AND srid NOT BETWEEN a2 and b2 ...');
 }}}

 We still have the issue of #1815, but I'm going to change that to a
 documentation fix that it's just by design that you can't backup
 spatial_ref_sys without backing up the whole database.  Not great but it's
 not in our court to play.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1834>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-devel mailing list