Re: How to create database with default system locale is set to et_EE.UTF-8 - Mailing list pgsql-general

From Bèrto ëd Sèra
Subject Re: How to create database with default system locale is set to et_EE.UTF-8
Date
Msg-id CAKwGa_9YfQkBgSmvwVYLOJ_RLN2ne=-pQCxnV3mtmaqh18nueA@mail.gmail.com
Whole thread Raw
In response to Re: How to create database with default system locale is set to et_EE.UTF-8  ("Andrus" <kobruleht2@hot.ee>)
List pgsql-general
Hi!
 
using template1 requires exclusive access to cluster.
I cannot force all users to log out while creating new db.
So using template1 is not possible.
 
IMHO you really misunderstood the manual. The exclusive access is NOT to the entire cluster, but to the template. Which in turn means that if you ever use an existing database (not a template) to create another with a copy procedure you definitely need to shut down this single database.

I'm creating stuff based on template1 (and a couple of internally produced templates) ~once a month, and I never ever had to ask people to log out. The only such issue is if and when you create a database, you use it, have people logged in, and then decide "wouldn't it be wonderful to use it as a template?". In that case yes, you have to require them to log out while you copy it to, say, template9. But from then on you create based on template9, and your previous db still remains a normal database.

You do want to read about templates and make a few experiments, I should say.

Bèrto
--
==============================
If Pac-Man had affected us as kids, we'd all be running around in a darkened room munching pills and listening to repetitive music.

pgsql-general by date:

Previous
From: Bèrto ëd Sèra
Date:
Subject: Re: How to create database with default system locale is set to et_EE.UTF-8
Next
From: Юра Величко
Date:
Subject: Default value of column in information_schema