From: | "Milen Kulev" <makulev(at)gmx(dot)net> |
---|---|
To: | "'Douglas McNaught'" <doug(at)mcnaught(dot)org> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Create database bug in 8.1.3 ? -> solved |
Date: | 2006-04-09 14:15:51 |
Message-ID: | 000701c65be0$1bb8b6d0$0a00a8c0@trivadis.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi Dough,
Thank you for your answer.
Now the reasons for using template0 DB are pretty clear (there a mini test-case
Of this in the mail you have just answered;)).
Thanks again.
Regards. Milen
-----Original Message-----
From: pgsql-general-owner(at)postgresql(dot)org [mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Douglas McNaught
Sent: Sunday, April 09, 2006 4:05 PM
To: Milen Kulev
Cc: 'William ZHANG'; pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Create database bug in 8.1.3 ? -> solved
"Milen Kulev" <makulev(at)gmx(dot)net> writes:
> Hi Wiliam,
> Than you very much for your prompt reply.
>
> I can not understand why pg_dump, pg_dumpall have hard-coded
> "template0" ?
The reason is this: any extra stuff that your database inherited from template1 (or whatever template you used) will be
dumped out as part of your database. There is no way to for pg_dump to tell what parts came from template1 and what
parts were added afterward, so it bases its dump on template0, which is a minimal database. If you based your restored
database on template1, you would get collisions as the restore tried to add objects that were already there from
template1.
Make sense?
-Doug
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster
From | Date | Subject | |
---|---|---|---|
Next Message | Merlin Moncure | 2006-04-09 15:12:43 | Re: how to document database |
Previous Message | Douglas McNaught | 2006-04-09 14:05:16 | Re: Create database bug in 8.1.3 ? -> solved |