Re: Automatic transactions in SELECT...

Поиск
Список
Период
Сортировка
От Sergey Konoplev
Тема Re: Automatic transactions in SELECT...
Дата
Msg-id CAL_0b1sj-yRZhBOM+qErXHhpxaTqs2CRYBowZ8c+TcuAG0hQ9A@mail.gmail.com
обсуждение исходный текст
Ответ на Automatic transactions in SELECT...  (Tom Lisjac <netdxr@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Automatic transactions in SELECT...
Следующее
От: Tom Lisjac
Дата:
Сообщение: Re: Automatic transactions in SELECT...