<html><body><div style="color:#000; background-color:#fff; font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:12pt"><div>I teach a class using PostGIS and have successfully used templates as an efficient way of copying databases for each class member (ie. selecting a populated database as the template).</div><div><br></div><div>However, in our new configuration this time around I have been getting error messages that the database is in use when they try and copy it.  Looking at pg_stat it seems there is no one connected to the template database but still it refuses to copy.  Starting and stopping the service fixes it temporarily.  They are all connecting as the same user.</div><div><br></div><div>Would appreciate any clues as to what is going on and any solutions?  We don't get any errors when creating new databases from template_postgis so is there some way I can set up the database in a similar
 fashion?</div><div><br></div><div>Postgres version: "PostgreSQL 9.0.4, compiled by Visual C++ build 1500, 32-bit"<br></div><div>Running on Windows Server 2008 (virtualised) via Windows Terminal Services</div><div><br></div><div>Thanks</div><div><br></div><div>Phil</div></div></body></html>