Opened 16 years ago

Closed 14 years ago

#67 closed enhancement (fixed)

new tablespace parameter for shp2pgsql

Reported by: kneufeld Owned by: kneufeld
Priority: medium Milestone: PostGIS 2.0.0
Component: postgis Version: master
Keywords: Cc:

Description (last modified by pramsey)

I would like to see the addition of a tablespace parameter added to shp2pgsql.

For loading large tables, this is currently a three stage process.

  • load DDL from shp2pgsql
  • use psql and alter the tablespace of the table
  • load the data from shp2pgsql

Postgres stores relations as individual files. When loading several thousand tables, the underlying OS can become slow when looking up a particular file/table. Having multiple tablespaces solves this problem.

Change History (6)

comment:1 by mcayland, 16 years ago

I guess that could be a useful feature; as a temporary work-around you could always use ALTER USER foo SET default_tablespace 'bar' and then load the shp2pgsql output as the foo user before reverting if required.

ATB,

Mark.

comment:2 by pramsey, 15 years ago

Description: modified (diff)
Milestone: postgis 1.4.1
Version: trunk

comment:3 by robe, 15 years ago

Wouldn't this be considered an API change in which case it should go to 1.5

comment:4 by mcayland, 15 years ago

+1 for saving until 1.5. Otherwise we fall back into the same trap of having feature changes in point release.

ATB,

Mark.

comment:5 by pramsey, 15 years ago

Milestone: postgis 1.4.1postgis 2.0.0

Rolling this forward

comment:6 by jadams, 14 years ago

Resolution: acceptedfixed
Status: assignedclosed

Implemented on trunk, rev 6905.

You specify the tablespace for the table and the indexes (primary key and spatial index if -I is specified) separately:

-T <table tablespace>

and/or

-X <index tablespace>

Note: See TracTickets for help on using tickets.