Re: Postgres config file: autocommit = off

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk>
Cc: Rasmus Resen Amossen <rresena(at)hotmail(dot)com>, tgl(at)sss(dot)pgh(dot)pa(dot)us, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Postgres config file: autocommit = off
Date: 2003-06-02 18:12:36
Message-ID: 200306021812.h52ICaX07574@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


SET autocommit to 'off' is going away in 7.4 so the SET USER command
will not work anymore in that release, and I can't think of a
workaround. There will be interface-specific settings, I assume, but I
am not sure how that would be controlled per-user.

---------------------------------------------------------------------------

Nigel J. Andrews wrote:
> On Sun, 1 Jun 2003, Rasmus Resen Amossen wrote:
>
> > >We have been there, done that, and decided it was a bad idea. I suggest
> > >you do a little reading in the mail list archives.
> >
> > I have searched the lists archives for the words "commit", "autocommit" and
> > "transaction" but couldn't find any discussion on wheter to give a database
> > administrator the option to turn automatic commit off was is a good idea or
> > not (not requirering the user to enter BEGIN; to start a transaction).
> >
> > Do you know the title of the thread or some more details on where to find
> > the arguments? I look forward to read that discussion. :-)
> >
> > Personally I am managing a database for approx. 500 people which are all
> > VERY dependant on the correctnes of the database. Sometimes, when we do
> > manually fixes in the database, it takes a series of statements before our
> > data mangeling leaves the databases in a consistent state again. Therefor it
> > is a quite serious problem for us if we forget the BEGIN-word (which happens
> > quite often :-( ), so we could really use the config file option mentioned.
> >
>
> I can't remember the discussion very clearly but I seem to recall that it was
> some sort of issue with some, but not all, of the interfaces.
>
> However, ignoring that you can set autocommit to off by altering the user. For
> example if the user you do the fixing as as described above is called dba_1
> then if you do:
>
> alter user dba_1 set autocommit to off;
>
> whenever you log in as the dba_1 user you will find that the autocommit is
> turned off.
>
>
> --
> Nigel J. Andrews
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-06-02 18:20:40 Re: Problems with renaming a column
Previous Message Rod Taylor 2003-06-02 18:12:30 Re: Problems with renaming a column