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

From: Bèrto ëd Sèra <berto(dot)d(dot)sera(at)gmail(dot)com>
To: Andrus <kobruleht2(at)hot(dot)ee>
Cc: adrian(dot)klaver(at)gmail(dot)com, pgsql-general(at)postgresql(dot)org
Subject: Re: How to create database with default system locale is set to et_EE.UTF-8
Date: 2011-12-22 17:15:36
Message-ID: CAKwGa_9YfQkBgSmvwVYLOJ_RLN2ne=-pQCxnV3mtmaqh18nueA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-general by date

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