Re: autovacuum and locks

From: "Dietmar Maurer" <dietmar(at)maurer-it(dot)com>
To: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: autovacuum and locks
Date: 2007-10-23 14:02:08
Message-ID: E88155B5BD67CE4D87A3F1F70950B96A1AFA98@berta.maurer-it.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> >
> > Why cant postgres get the RowExclusiveLock in transaction 3369000?
>
> Probably because the ExclusiveLock'ers are waiting in front
> of RowExclusiveLock. Locks are granted in order.
>
> It would help if you didn't mangle the pg_locks output so badly.

Yes, sorry about that.

I was able to reproduce the problem, and the problem is that locks are
granted in order (wonder why?). Anyways, i am trying to avoid locks now,
by using my own merge function to avoid update/insert race condition.

Or what is the suggested way to avoid the update/insert race condition?.

- Dietmar

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Roger Mason 2007-10-23 14:06:34 can't compile Pl/Java
Previous Message Alvaro Herrera 2007-10-23 13:55:10 Re: How to speedup intarray aggregate function?