Skip site navigation (1) Skip section navigation (2)

Re: suggestion

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jan Cruz" <malebug(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: suggestion
Date: 2006-02-24 04:45:47
Message-ID: 29115.1140756347@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
"Jan Cruz" <malebug(at)gmail(dot)com> writes:
> On 2/24/06, Michael Glaesemann <grzm(at)myrealbox(dot)com> wrote:
>> If this doesn't do what you want, can you give a bit more
>> explanation? Also, what are you trying to do with this dump file?

> I also want an option that would exclude  "CREATE INDEX "  whenever
> a schema is being dump

> The reason for this is that whenever I tried to migrate database
> whenever I restore a schema with indexes and then
> restore the data separately it took more or less 24 hours instead of
> the usual 1 hour more or less.

Restoring schema and data separately is guaranteed to be less efficient
than restoring a combined dump.  An option to omit indexes from the
schema dump will not fix this.  Indeed it will arguably make things
worse --- in the first place there are severe performance issues
associated with unindexed foreign-key checks, and in the second place
there is the foot-gun problem that you might forget to re-add the
indexes at all.

I think the right question to ask here is "why are you so intent on
using separate schema/data restores?"  That's not the recommended way
to go about things, and it never will be.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Jan CruzDate: 2006-02-24 05:23:44
Subject: Re: suggestion
Previous:From: Tom LaneDate: 2006-02-24 04:32:05
Subject: Re: fsutil ideas

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group