ansible/ansible-modules-core — pull request #559 by mjschultz (2014-12-23 20:23:07+00:00)
Title: Build the db connection on `"postgres"` instead of `"template1"`

According to the postgresql docs[1], you should not have a connection with
`"template1"` when copying multiple databases.

In my case I wanted to create around 20 databases in parallel but only one was able to succeed because postgres saw the other connections to the `"template1"` database and (rightfully) prevented duplicating it. This change solved that problem for me. I don't know the rationale for the original choice (it was in the initial commit for this module), so I may be missing something.

[1]: http://www.postgresql.org/docs/9.1/static/manage-ag-templatedbs.html