Re: Will UPDATE lock if FROM refers to target table?

From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "Carlo Stonebanks *EXTERN*" <stonec(dot)register(at)sympatico(dot)ca>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Will UPDATE lock if FROM refers to target table?
Date: 2007-10-15 07:52:10
Message-ID: D960CB61B694CF459DCFB4B0128514C22D6E6E@exadv11.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Carlo Stonebanks wrote:
> If I do an update using the FROM clause, and that clause has a sub-query
> that refers to the table I am updating, will I be waiting for ever for a
> table to lock to release?

You cannot block yourself with a lock, if that's what you mean.
The locks your session takes out will only block other sessions.

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Syan Tan 2007-10-15 07:59:37 Re: atomic commit; begin for long running transactions , in combination with savepoint.
Previous Message Tomasz Ostrowski 2007-10-15 07:10:27 Re: RES: 8.2.4 selects make applications wait indefinitely