Re: create database from template requires the source database to be unused

From: Alban Hertroys <haramrae(at)gmail(dot)com>
To: "Haszlakiewicz, Eric" <EHASZLA(at)transunion(dot)com>
Cc: Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>, Tim Uckun <timuckun(at)gmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: create database from template requires the source database to be unused
Date: 2012-06-28 15:49:02
Message-ID: CAF-3MvMQtMLYjLrsFci=wmBt+Vnw=h_+672-gGBHZsik6G1Z+Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> I've read that postgres uses MVCC for transactions, and that it creates
> snapshots of the database for each transaction.  Couldn't the create
> database command just use that snapshot?

Database creation cannot be done inside a transaction (one of the few
DDL statements that can't), so no.

--
If you can't see the forest for the trees,
Cut the trees and you'll see there is no forest.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Arjen Nienhuis 2012-06-28 16:01:39 Re: create a script which imports csv data
Previous Message Haszlakiewicz, Eric 2012-06-28 15:10:44 Re: create database from template requires the source database to be unused