Re: Create database bug in 8.1.3 ? -> solved

From: Douglas McNaught <doug(at)mcnaught(dot)org>
To: "Milen Kulev" <makulev(at)gmx(dot)net>
Cc: "'William ZHANG'" <uniware(at)zedware(dot)org>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Create database bug in 8.1.3 ? -> solved
Date: 2006-04-09 14:05:16
Message-ID: 871ww6yhcz.fsf@suzuka.mcnaught.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Milen Kulev 2006-04-09 14:15:51 Re: Create database bug in 8.1.3 ? -> solved
Previous Message Milen Kulev 2006-04-09 13:54:12 "Pg_restore -C" is not creating a database ( Was Create database bug in 8.1.3 ? )