Re: looking for doc

Поиск
Список
Период
Сортировка
От Kasia Tuszynska
Тема Re: looking for doc
Дата
Msg-id 6C308A1FFB24664F8636F3B58ABEF84588719958@RED-INF-EXMB-P2.esri.com
обсуждение исходный текст
Ответ на Re: looking for doc  (David Johnston <polobo@yahoo.com>)
Список 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
withtemplate0 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
behaviorcan be overwritten with template 0 and thus it would be unadvisable to recommend dbs created based on template
0to non admin minded administrators of Postgres. But I cannot find any doc that describes this behavior and I cannot
findany 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@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of David Johnston
Sent: Monday, March 17, 2014 3:26 PM
To: pgsql-admin@postgresql.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 <

> ktuszynska@

> >:
>> 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
createdas 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
leavingtemplate0 available for those situation where those customizations in template1 are not desired (i.e, CREATE
DATABASEdbname0 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
changeit 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



В списке pgsql-admin по дате отправления:

Предыдущее
От: David Johnston
Дата:
Сообщение: Re: looking for doc
Следующее
От: Murthy Nunna
Дата:
Сообщение: pg_upgrade in primary/standby architecture