Re: Automatic transactions in SELECT...

From: Tom Lisjac <netdxr(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Automatic transactions in SELECT...
Date: 2013-02-09 04:00:17
Message-ID: 5115C9D1.8090604@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On 02/08/2013 08:23 PM, Tom Lane wrote:
> Tom Lisjac <netdxr(at)gmail(dot)com> writes:
>> 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.
> There's no such behavior in the server. If you're using any client
> library above the level of libpq, it might be trying to be "helpful"
> by managing transactions --- but you've not said what your client-side
> programmming environment is, so it's hard to speculate about that.
>
> regards, tom lane

Hi Tom,

Thanks for the quick reply... and good point about the layers between
the app and db. The team is using Java/JBoss/Hibernate, so a great deal
of "helpfulness" is possible where a setting somewhere in that stack
might be the root cause.

I'm in a management role on this and not that close to the details, but
I've worked with Postgres as a developer, respect it greatly and don't
want it unjustly blamed for a client-side error.

Best regards,

-Tom

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2013-02-09 04:17:54 Re: Automatic transactions in SELECT...
Previous Message Sergey Konoplev 2013-02-09 03:28:55 Re: Automatic transactions in SELECT...