On Fri, Apr 7, 2017 at 1:25 PM, Tim Nelson <timn...@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.

Reply via email to