Re: template0 and template1 databases

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: template0 and template1 databases
Дата
Msg-id 3759.999805348@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: template0 and template1 databases  (Andrew Gould <andrewgould@yahoo.com>)
Ответы Re: template0 and template1 databases
Список pgsql-general
Andrew Gould <andrewgould@yahoo.com> writes:
> Okay, so I don't need to pg_dump the template*
> databases; and I should not dropdb them.

template0 shouldn't need to be dumped, since it's always supposed to be
virgin initdb data.  template1 may need to be dumped if you have any
site-local additions in it.  pg_dumpall gets these considerations right.

As for dropping, the system won't let you do it unless you go in and
hand-hack pg_database's datistemplate flags.  I have actually tested
dropping template1 and recreating it from template0, which I suppose
someone might want to do if they mess up template1 badly enough.
If you drop template0, you no longer have a guaranteed virgin database
to use as a reference, but perhaps that doesn't bother you.

> My scripts aren't anything to brag about; but I think
> newbies (such as myself) may find them useful.  Who
> reviews contributions for /contrib?

Send 'em to pgsql-patches, I guess.

            regards, tom lane

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

Предыдущее
От: Andrew Gould
Дата:
Сообщение: Re: template0 and template1 databases
Следующее
От: "Ian Harding"
Дата:
Сообщение: SQL Server to PostgreSQL HOWTO