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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Cruz 2006-02-24 05:23:44 Re: suggestion
Previous Message Tom Lane 2006-02-24 04:32:05 Re: fsutil ideas