pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Molesworth <tom@audioboundary.com>
To: pgsql-performance@postgresql.org
Subject: Re: Dead lock
Date: Mon, 14 Jun 2010 13:54:24 +0100
Message-ID: <4C162680.8090502@audioboundary.com> (raw)
In-Reply-To: <4C161793.2090105@acteos.com>
References: <4C161793.2090105@acteos.com>

On 14/06/10 12:50, Elias Ghanem wrote:
>         SELECT INTO DUMMY DBLINK_EXEC(''CONNECTION_STRING TO DB3', 
> ''UPDATE IN_FICHE_PRODUIT SET VALIDE = 1'');

If there's more than one value in that table, an explicit ORDER BY might 
help (otherwise you could get the situation where query A will update in 
the order 1,2,3 and query B will do 3,2,1 so neither will be able to get 
the requested locks until the other query has finished).

Tom




view thread (6+ messages)  latest in thread

Message-ID: <4C162680.8090502@audioboundary.com>
Permalink:  ../4C162680.8090502@audioboundary.com/
Also on:    postgresql.org/message-id/4C162680.8090502@audioboundary.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tom@audioboundary.com
  Subject: Re: Dead lock
  In-Reply-To: <4C162680.8090502@audioboundary.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox