Re: Automatic transactions in SELECT... - Mailing list pgsql-novice

From Sergey Konoplev
Subject Re: Automatic transactions in SELECT...
Date
Msg-id CAL_0b1sj-yRZhBOM+qErXHhpxaTqs2CRYBowZ8c+TcuAG0hQ9A@mail.gmail.com
Whole thread Raw
In response to Automatic transactions in SELECT...  (Tom Lisjac <netdxr@gmail.com>)
List pgsql-novice
On Fri, Feb 8, 2013 at 6:16 PM, Tom Lisjac <netdxr@gmail.com> wrote:
> We're in the process of deploying 9.2.1 to support an internal
> application we've been working on for the last few months. One of our
> programmers has recently complained that we get occasional hangs because
> "postgres automatically runs SELECT statements in a transaction that
> requires an explicit commit".
>
> That makes little sense and sounds like a dangling transaction, but in
> fairness I wanted to confirm that there isn't a set of defaults or flags
> that might cause the appearance of this behavior in version 9. I've been

I believe that the easiest way find out what is wrong is to ask the
programmer for more information of what exactly happens since the
start of the transaction and till the moment when it hangs.

He probably refers to the SELECTs that might occur during FK checks.
They look like this:

SELECT 1 FROM ONLY public.table1 x
WHERE $1 OPERATOR(pg_catalog.=) column
FOR SHARE OF x

If so than it make sense.

> unable to find any references on this and would greatly appreciate
> comments or pointers to docs that would help to clarify the issue.
>
> Thanks,
>
> -Tom
>
>
>
> --
> Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-novice



--
Sergey Konoplev
Database and software architect
http://www.linkedin.com/in/grayhemp

Phones:
USA +1 415 867 9984
Russia, Moscow +7 901 903 0499
Russia, Krasnodar +7 988 888 1979

Skype: gray-hemp
Jabber: gray.ru@gmail.com


pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: Automatic transactions in SELECT...
Next
From: Tom Lisjac
Date:
Subject: Re: Automatic transactions in SELECT...