Updates on one row causing ExclusiveLock on PostgreSQL 8.3.5

Поиск
Список
Период
Сортировка
От PostgreSQL
Тема Updates on one row causing ExclusiveLock on PostgreSQL 8.3.5
Дата
Msg-id 50EF0292.4000605@vorio.com.br
обсуждение исходный текст
Список pgsql-performance
My best regards for all...

Please.  I need for an advice.
I'm having a trouble, that puting others queries in wait state, becouse
of ExclusiveLock granted by an Update that only update one row at each
time.   This update occurs into a function and this function are
executed several times and concurrently.
Below, query plan (explain):

Nested Loop  (cost=16.91..36.32 rows=1 width=75)
   ->  HashAggregate  (cost=16.91..16.92 rows=1 width=4)
         ->  Index Scan using unq_customer_idx_msisdn on customer
(cost=0.00..16.90 rows=1 width=4)
               Index Cond: ((msisdn)::text = '558796013980'::text)
   ->  Index Scan using pk_customer_rel_channel on customer_rel_channel
(cost=0.00..19.39 rows=1 width=75)
         Index Cond: ((customer_rel_channel.id_customer =
customer.id_customer) AND (customer_rel_channel.id_channel = 282))

But, the pg_locs shows:

PID    Relation    User    Transaction    Access Mode    Granted Query
Start    Query
22569    customer_rel_channel    postgres        ExclusiveLock False
2013-01-10 15:54:09.308056-02    UPDATE news.customer_rel_channel SET
status = $1, source = $2
             WHERE news.customer_rel_channel.id_channel = $3 AND
             news.customer_rel_channel.id_customer IN
             (SELECT id_customer FROM public.customer WHERE
public.customer.msisdn = $4)


В списке pgsql-performance по дате отправления:

Предыдущее
От: PostgreSQL
Дата:
Сообщение: Updates on one row causing ExclusiveLock on PostgreSQL 8.3.5
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: Slow query after upgrade from 9.0 to 9.2