create database from template requires the source database to be unused - Mailing list pgsql-general

From Tim Uckun
Subject create database from template requires the source database to be unused
Date
Msg-id CAGuHJrNJyvD8zHqmWnODGvS7MAm7-yJVO81Baxz8L=5pgfMWVw@mail.gmail.com
Whole thread Raw
Responses Re: create database from template requires the source database to be unused  (Craig Ringer <ringerc@ringerc.id.au>)
Re: create database from template requires the source database to be unused  (Alban Hertroys <haramrae@gmail.com>)
List pgsql-general
I am sure this is intended behavior but it seems odd (and inconvenient) to me.

create database tim_test_copy template tim_test

ERROR:  source database "tim_test" is being accessed by other users
DETAIL:  There are 1 other session(s) using the database.

I would presume only reads are required from tim_test but apparently I
have to resort to pg_dump and pg_restore to clone an active database.

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Catching DETAIL and HINT
Next
From: Paul McGarry
Date:
Subject: log_min_duration_statement modification for non superusers?