pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Larry Rosenman <ler@lerctr.org>
To: PostgreSQL SQL List <pgsql-sql@postgresql.org>
Subject: locking/concurrency question.
Date: Fri, 25 May 2001 02:56:23 -0500
Message-ID: <20010525025623.A26048@lerami.lerctr.org> (raw)

I have an app  that does essentially the following query:

SELECT host(netblock),masklen(netblock),netblock,netmask(netblock)
FROM networks 
WHERE status=get_status_code('available') AND parent_asn=4278 
      AND masklen(netblock)=xx -- where xx is a legit mask size
FOR UPDATE
LIMIT 1;

inside a BEGIN TRANSACTION block.

My question is:

if a 2nd copy of this query runs with the same size, will it skip the
locked row, or wait for commit? 

-- 
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 972-414-9812                 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749



Message-ID: <20010525025623.A26048@lerami.lerctr.org>
Permalink:  ../20010525025623.A26048@lerami.lerctr.org/
Also on:    postgresql.org/message-id/20010525025623.A26048@lerami.lerctr.org

 · 

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-sql@postgresql.org
  Cc: ler@lerctr.org
  Subject: Re: locking/concurrency question.
  In-Reply-To: <20010525025623.A26048@lerami.lerctr.org>

* 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