Re: looking for doc

From: Kasia Tuszynska <ktuszynska(at)esri(dot)com>
To: David Johnston <polobo(at)yahoo(dot)com>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: looking for doc
Date: 2014-03-17 22:51:44
Message-ID: 6C308A1FFB24664F8636F3B58ABEF84588719958@RED-INF-EXMB-P2.esri.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Thanks David,
I must have remembered something wrong.
I thought I remembered that one of the differences between template 1 and template 0 was that when a db was created with template0 that autovacuum was switched off.
I know that it autovacuum is controlled in the postgresql.conf file but for some reason I thought that the .conf behavior can be overwritten with template 0 and thus it would be unadvisable to recommend dbs created based on template 0 to non admin minded administrators of Postgres. But I cannot find any doc that describes this behavior and I cannot find any such parameter in the pg_catalog tables.
So, at this point I am going to chock it up to faulty user memory.
Thanks,
Kasia

-----Original Message-----
From: pgsql-admin-owner(at)postgresql(dot)org [mailto:pgsql-admin-owner(at)postgresql(dot)org] On Behalf Of David Johnston
Sent: Monday, March 17, 2014 3:26 PM
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] looking for doc

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-templated
> bs.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(at)postgresql(dot)org) To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Murthy Nunna 2014-03-18 02:52:34 pg_upgrade in primary/standby architecture
Previous Message David Johnston 2014-03-17 22:33:03 Re: looking for doc