Re: Misunderstanding transactions and locks

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Michael P(dot) Soulier <michael_soulier(at)mitel(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Misunderstanding transactions and locks
Date: 2010-06-16 20:01:04
Message-ID: 1276718397-sup-9623@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Excerpts from Michael P. Soulier's message of mié jun 16 12:21:16 -0400 2010:
> Hi,
>
> I'm using Django with Postgres 8.3.9 on CentOS Linux.
>
> I'm trying to figure out why locking isn't working as I'm expecting. I have a
> an operation wrapped in a transaction where I explicitely grab an exclusive
> lock on my table. When another process concurrently runs to do the same, it
> should block on attempting to acquire the exclusive lock, no?

> 2010-06-16 12:14:31.913008500 LOG: statement: LOCK TABLE instances IN ROW
> EXCLUSIVE MODE

"row exclusive mode" does not block itself.

--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-06-16 20:37:17 Re: Misunderstanding transactions and locks
Previous Message Adrian von Bidder 2010-06-16 20:00:58 Re: hi, i write a function in postgresql source code, how to register this function?