From: | Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> |
---|---|
To: | Tony Wang <wwwjfy(at)gmail(dot)com> |
Cc: | PostgreSQL <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Weird problem that enormous locks |
Date: | 2011-07-14 17:13:01 |
Message-ID: | CAOR=d=1i5CyArDxbJ-Hp41jnh7wH-eG7dVnhJO05q9MxN5n1-A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, Jul 13, 2011 at 9:47 PM, Tony Wang <wwwjfy(at)gmail(dot)com> wrote:
> On Thu, Jul 14, 2011 at 10:35, John R Pierce <pierce(at)hogranch(dot)com> wrote:
> It's a game server, and the queries are updating users' money, as normal.
> The sql is like "UPDATE player SET money = money + 100 where id = 12345".
> The locks were RowExclusiveLock for the table "player" and the indexes. The
> weird thing is there was another ExclusiveLock for the table "player", i.e.
> "player" got two locks, one RowExclusiveLock and one ExclusiveLock.
> In the postgresql documentation
> (http://www.postgresql.org/docs/8.4/static/explicit-locking.html), it's said
> about the Exclusive "This lock mode is not automatically acquired on user
> tables by any PostgreSQL command."
You need to figure out what part of your app, or maybe a rogue
developer etc is throwing an exclusive lock.
From | Date | Subject | |
---|---|---|---|
Next Message | Tony Wang | 2011-07-15 00:01:47 | Re: Weird problem that enormous locks |
Previous Message | stefanu | 2011-07-14 14:05:06 | Hot standby on Windows |