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

From Alban Hertroys
Subject Re: create database from template requires the source database to be unused
Date
Msg-id CAF-3MvMQtMLYjLrsFci=wmBt+Vnw=h_+672-gGBHZsik6G1Z+Q@mail.gmail.com
Whole thread Raw
In response to Re: create database from template requires the source database to be unused  ("Haszlakiewicz, Eric" <EHASZLA@transunion.com>)
Responses Re: create database from template requires the source database to be unused  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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.

pgsql-general by date:

Previous
From: "Haszlakiewicz, Eric"
Date:
Subject: Re: create database from template requires the source database to be unused
Next
From: Arjen Nienhuis
Date:
Subject: Re: create a script which imports csv data