Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 945492E0032 for ; Thu, 22 Nov 2007 15:12:45 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 75315-04 for ; Thu, 22 Nov 2007 15:12:39 -0400 (AST) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.180]) by postgresql.org (Postfix) with ESMTP id D51372E003A for ; Thu, 22 Nov 2007 15:12:38 -0400 (AST) Received: by wa-out-1112.google.com with SMTP id m38so3685720waf for ; Thu, 22 Nov 2007 11:12:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=UXswtpszQYCvTE/vB9049e8t6aSuxMZnMPboVOi9W8Y=; b=frHtTPwOMq157urCfJAtHevRNK+U2EFpzmfXIdyXGUwi/szsDwwjNx4pZ69L7wbBg5ZmjrBINPnfyQmyprJxObJmLRPFXmJ61NvfrODVNGVmTaeKTtCOhGbeaWOM+N01Hu7QCpkCGHoagF6o7vXutCgm8iamkxX8AZY2fS86LOE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=TVrJFrI88LaJSW0dXedA0GkNmOvUEF7Hf/Z4VsQ8FKVcDqi3EjbptHrLaI2dqk8xgnHMT55/wvoqNQSRPTv10G4FnxZigtV4nLgee6TdKgvaN0B306dUtsc2xSD6TBmQQZcuRfvk19E17mnahdafFbJEpDSn/UEu7P7KiqmcI60= Received: by 10.114.124.1 with SMTP id w1mr433302wac.1195758757119; Thu, 22 Nov 2007 11:12:37 -0800 (PST) Received: by 10.114.132.13 with HTTP; Thu, 22 Nov 2007 11:12:37 -0800 (PST) Message-ID: Date: Thu, 22 Nov 2007 13:12:37 -0600 From: "Scott Marlowe" To: PostgreSQL Subject: Re: Row Lock Cc: pgsql-admin@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/203 X-Sequence-Number: 27446 On Nov 22, 2007 12:31 PM, PostgreSQL wrote: > I'm having a problem with some row locks where one user does the lock > and another user try to do the same, but of course, the second one will > be waiting the first user unlock it. > > I would like to know if there is a way to discover if that row is locked > before I try to do the lock. > > I have been researching something like ROWID but I couldn't find > anything useful. I believe you want the NOWAIT option on your select.