Re: pg_restore and create FK without verification check

From: ow <oneway_111(at)yahoo(dot)com>
To: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
Cc: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "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-27 06:11:20
Message-ID: 20031127061120.1262.qmail@web21405.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

--- Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> wrote:
> On Thu, Nov 27, 2003 at 12:40:28AM +0100, Andreas Pflug wrote:
>
> > A common mistake, can't count how often I created this one... And not
> > easy to find, because EXPLAIN won't explain triggers.
>
> That's a pity. And the lack of EXPLAINing function execution, too.
> Maybe it's not that hard to do?
>

I'd like to emphasize again that NOT having an index on the FK column is a
perfectly valid approach, despite some opinions to the contrary. In fact,
requiring an index on FK column(s) when it is not required by the
application's logic IS a mistake since it slows down
inserts/deletes/updates/vacume/reindex/etc on the respective table and wastes
disk space (could be considerable amount on large tables).

Also, FK column index DOES NOT, in general, solve performance issues with FK
verification check. Someone may (and, I'm sure, will) simply have more data or
more constraints.

The only solution here appears to be the "--disable-triggers" option as it was
suggested by Robert Treat. If it works then I'm fine, somehow I did not see
that option in the beginning.

Thanks

__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Shridhar Daithankar 2003-11-27 06:17:45 Re: 7.5 Plans
Previous Message Mike Macaskill 2003-11-27 06:03:51 Date bug in PG