Re: [GENERAL] SELECT and RowExclusiveLock

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: [GENERAL] SELECT and RowExclusiveLock
Дата
Msg-id CAKFQuwbHo=GYUm30+uAVRDBW+MsiEk9LyBV=2BKR-CybG=2ZvQ@mail.gmail.com
обсуждение исходный текст
Ответ на [GENERAL] SELECT and RowExclusiveLock  (Tim Nelson <timnels@gmail.com>)
Список pgsql-general
On Fri, Apr 7, 2017 at 1:25 PM, Tim Nelson <timnels@gmail.com> wrote:
New to Postgres and I have never seen this condition.  We are getting test applications hanging on SELECT statements with a RowExclusiveLock.  How can a SELECT cause a RowExclusiveLock?

Two common ways:

SELECT ... FOR UPDATE;

SELECT function_that_performs_updates();

There are some more moving parts here, especially transactions, that may be coming into play.  Its hard to say more given the limited and partial detail.  Version and a more complete pg_stat_activity query would be helpful.

David J.

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: [GENERAL] SELECT and RowExclusiveLock
Следующее
От: John Iliffe
Дата:
Сообщение: [GENERAL] Unable to connect to Postgresql