Re: pg_restore and create FK without verification check

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: ow <oneway_111(at)yahoo(dot)com>, Andreas Pflug <pgadmin(at)pse-consulting(dot)de>, Hannu Krosing <hannu(at)tm(dot)ee>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_restore and create FK without verification check
Date: 2003-11-26 23:21:00
Message-ID: 20031126151859.T68306@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Wed, 26 Nov 2003, Tom Lane wrote:

> ow <oneway_111(at)yahoo(dot)com> writes:
> > --- Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >> Quite honestly, I think they should check their foreign keys.
>
> > Generally speaking, I agree. The problem is that verification of FK
> > constraint(s) may take too long, depending on the size of the db and other
> > conditions. In my case, on test data, it takes about 1 hour to create tables
> > and copy the data, then about 40 min to create indexes, then 4.5 hours to
> > create one (1) FK constraint.
>
> If you're seeing this on 7.4, I'd like to see the details of the exact
> commands being issued. If it's not 7.4, it's not a relevant

IIRC, he was. I think the thing causing the difference between his times
and the ones we saw typically when doing the tests was that he didn't have
an index on the fktable's referencing column.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andreas Pflug 2003-11-26 23:21:22 Re: ALTER COLUMN/logical column position
Previous Message Michal Zaborowski 2003-11-26 22:58:46 Re: Size on Disk