Re: BUG #2372: dblink_exec doesn't return. NEVER!

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "William Leite Ara jo" <william(dot)bh(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2372: dblink_exec doesn't return. NEVER!
Date: 2006-04-03 21:15:10
Message-ID: 16788.1144098910@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"William Leite Arajo" <william(dot)bh(at)gmail(dot)com> writes:
> A trigger start a dblink_exec local connection to insert on a table "A" as
> SuperUser. Table "A" fires insert trigger that, by LOG messages, ends, but
> the function never return to initial trigger.

Perhaps the other transaction is blocked on some lock held by your
original transaction?

dblink connections to your own database are very seldom a good idea;
there is always a better, more efficient, less deadlock-prone way
to do it. In this case I'd venture that you want to use a SECURITY
DEFINER function, and not dblink at all.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Stephen Frost 2006-04-03 21:29:46 Re: BUG #2372: dblink_exec doesn't return. NEVER!
Previous Message William Leite Arajo 2006-04-03 21:09:50 BUG #2372: dblink_exec doesn't return. NEVER!