pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Johnston <polobo@yahoo.com>
To: pgsql-admin@postgresql.org
Subject: Re: looking for doc
Date: Mon, 17 Mar 2014 15:25:46 -0700 (PDT)
Message-ID: <1395095146819-5796459.post@n5.nabble.com> (raw)
In-Reply-To: <6C308A1FFB24664F8636F3B58ABEF8458871991F@RED-INF-EXMB-P2.esri.com>
References: <6C308A1FFB24664F8636F3B58ABEF845887198E2@RED-INF-EXMB-P2.esri.com>
	<CAB8KJ=iArO5sWtj6UB5WAdFQ09p8Zd-Hzd+i70DSOh6whS5TMQ@mail.gmail.com>
	<6C308A1FFB24664F8636F3B58ABEF8458871991F@RED-INF-EXMB-P2.esri.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

Kasia Tuszynska wrote
> Ian,
> Thanks that is the really only doc that comes up when I search for this.
> It discusses how to call a template to create a new db, but it does not
> list the differences between them. I am going to try to just find a
> definition of both.
> Thanks,
> Kasia 
> 
> -----Original Message-----
> From: Ian Lawrence Barwick [mailto:

> barwick@

> ] 
> Sent: Monday, March 17, 2014 2:52 PM
> To: Kasia Tuszynska
> Cc: 

> pgsql-admin@

> Subject: Re: [ADMIN] looking for doc
> 
> 2014-03-18 6:37 GMT+09:00 Kasia Tuszynska &lt;

> ktuszynska@

> &gt;:
>> Admins,
>> I am looking for doc that defines the differences between template 1 and
>> template 0. Specifically, I am looking for a discussion on the presence
>> of admin tasks in template 1 and lack of admin tasks ( such as vacuum) in
>> template 0. I am not able to find doc on this, maybe I am remembering
>> something that is no longer the case.
> 
> Is this useful for you?
> 
>    
> http://www.postgresql.org/docs/current/interactive/manage-ag-templatedbs.html
> 
> Regards
> 
> Ian Barwick

The only difference between them is semantic.  In fact, as that page says
explicitly, at cluster creation time they are identical.

I will paraphrase the first two paragraphs to see if you understand it
better:

template0 is created upon cluster initialization and should never be
altered.  As a practical matter template1 is then created as a clone of
template0.  The purpose of template1 is to allow for the issuance of an
implicit "CREATE DATABASE %dbname% TEMPLATE = 'template1';" since template1
is the default template and all database creation occurs via template
copying.  

Admins can alter template1 to include custom stuff that will then be present
in any database created from it while leaving template0 available for those
situation where those customizations in template1 are not desired (i.e,
CREATE DATABASE dbname0 TEMPLATE = 'template0';)

i do not get what you mean by "admin tasks in template1, not in template0". 
If you mean why (assuming you are correct) doesn't the system VACUUM
template0 that would be because it should never change and thus never
require such maintenance.  Since template1 can change it does require
maintenance.

David J.
 



--
View this message in context: http://postgresql.1045698.n5.nabble.com/looking-for-doc-tp5796445p5796459.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



view thread (9+ messages)  latest in thread

Message-ID: <1395095146819-5796459.post@n5.nabble.com>
Permalink:  ../1395095146819-5796459.post@n5.nabble.com/
Also on:    postgresql.org/message-id/1395095146819-5796459.post@n5.nabble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: polobo@yahoo.com
  Subject: Re: looking for doc
  In-Reply-To: <1395095146819-5796459.post@n5.nabble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox