Tom Lane wrote:
Your test case simply shows that it takes a finite amount of time for the previous backend to exit; depending on scheduler priorities it's possible for the next instance to connect and try to CREATE DATABASE before the previous one is gone. My suggestion would be to connect to some other database besides the one being copied.
Didn't we invent the "postgres" database for just this reason? cheers andrew ---------------------------(end of broadcast)--------------------------- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate