From: | Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> |
---|---|
To: | Stephen Touset <stephen(dot)touset(at)onelogin(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Implicit transaction not rolling back after error |
Date: | 2012-12-21 02:22:21 |
Message-ID: | CAOR=d=0LGmuvnE06Wj1NozcezBzOem_Vshz5xsVhWEuQpLgxVw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Dec 20, 2012 at 7:04 PM, Stephen Touset
<stephen(dot)touset(at)onelogin(dot)com> wrote:
> On Dec 20, 2012, at 3:40 PM, Rob Sargent <robjsargent(at)gmail(dot)com> wrote:
>
>> On 12/20/2012 04:33 PM, Stephen Touset wrote:
>>
>>> So yes, AUTOCOMMIT is definitely on.
>>
>> What does \set show when entered from the psql command line?
>
> test=> \set
> AUTOCOMMIT = 'OFF'
>
> *facepalm*.
\set is a psql command
> Turns out someone put a .psqlrc with autocommit off in /etc/skel when the box was originally set up as a replacement for our previous app server. Account users were created afterwards, and the change propagated to our application account as well as all of our individual accounts.
>
> Why, though, would `SHOW AUTOCOMMIT` lie? And `SET AUTOCOMMIT TO off` says that capability is disabled. So how does the config file manage to do it?
show variable is a SQL command to the backend engine. The backend
does not support autocommit on / off (it did once upon a time for a
little while but it broke lots of stuff and got reverted).
autocommit is now firmly a client side behavior, not a backend behavior.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2012-12-21 05:05:26 | Re: Using POSIX Regular Expressions on xml type fields gives inconsistent results |
Previous Message | Stephen Touset | 2012-12-21 02:04:38 | Re: Implicit transaction not rolling back after error |