create database from template requires the source database to be unused

From: Tim Uckun <timuckun(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: create database from template requires the source database to be unused
Date: 2012-06-28 03:11:05
Message-ID: CAGuHJrNJyvD8zHqmWnODGvS7MAm7-yJVO81Baxz8L=5pgfMWVw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Paul McGarry 2012-06-28 03:15:22 log_min_duration_statement modification for non superusers?
Previous Message Tom Lane 2012-06-28 01:06:43 Re: Catching DETAIL and HINT