template1 is a poor choice: use the standard 'postgres' database instead.