postgis template database

Some might find this useful for creating PostGIS databases without having to be postgresql superusers. The idea is to create a template_postgis database, install plpgsql and postgis into it, and then use this database as a template when creating new PostGIS databases.

Now non-superuser’s can create postgis db’s using template_postgis:

createdb -h host-name my_gisdb -W -T template_postgis

5 thoughts on “postgis template database

  1. Pingback: chetantiwari.com » Blog Archive » Allow non superuser accounts to create spatial databases

  2. Pingback: PostGIS is here! « The University of Manchester Geospatial Blog

  3. This is a good tutorial on how to create a spatial database template, but I don't understand the need for a vacuum freeze or even a vacuum full. Could comment on why this would be important.

    Thanks

  4. Jean, we have just loaded a large amount of data into the template_postgis database. To make sure that the query planner has up-to-date stats its generally good practice to run Vacuum after making a large change to a database. Secondly we are also locking the database to prevent any further changes. So its a good idea to do it at this stage.

  5. Pingback: OSM + ImpOSM + TileMill « geomaticblog

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>