Re: Really strange foreign key constraint problem blocking delete

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: Tim Mickelson <tim_mickelson(at)bigfoot(dot)com>, Jim Nasby <jim(dot)nasby(at)bluetreble(dot)com>, pgsql-general(at)postgresql(dot)org, Andy Colson <andy(at)squeakycode(dot)net>
Subject: Re: Really strange foreign key constraint problem blocking delete
Date: 2014-10-07 13:45:25
Message-ID: 22260.1412689525@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> writes:
> SET enable_indexscan=off;

> EXPLAIN ANALYZE DELETE query

> SET enable_indexscan=on;

Note that you'd probably best do this in a fresh session, since the
supposed problem is being tickled by a foreign-key check. I think
the plans for those get cached, so if you'd already tried the same
case earlier in the session, changing enable_indexscan wouldn't
change the plan used.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Marc Mamin 2014-10-07 14:02:05 Re: faster way to calculate top "tags" for a "resource" based on a column
Previous Message Emanuel Calvo 2014-10-07 13:30:03 Re: Processor usage/tuning question