pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
turn off auto-commit
13+ messages / 4 participants
[nested] [flat]

* turn off auto-commit
@ 2002-08-30 17:29 Waruna Geekiyanage <waruna@nirmani.com>
  2002-08-30 19:38 ` Re: turn off auto-commit Nick Fankhauser <nickf@ontko.com>
  2002-08-31 00:48 ` Re: turn off auto-commit Bruce Momjian <pgman@candle.pha.pa.us>
  0 siblings, 2 replies; 13+ messages in thread

From: Waruna Geekiyanage @ 2002-08-30 17:29 UTC (permalink / raw)
  To: pgsql-admin

How to turn off auto-commit in pgsql 7.2?

^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: turn off auto-commit
  2002-08-30 17:29 turn off auto-commit Waruna Geekiyanage <waruna@nirmani.com>
@ 2002-08-30 19:38 ` Nick Fankhauser <nickf@ontko.com>
  1 sibling, 0 replies; 13+ messages in thread

From: Nick Fankhauser @ 2002-08-30 19:38 UTC (permalink / raw)
  To: Waruna Geekiyanage <waruna@nirmani.com>; pgsql-admin


>How to turn off auto-commit in pgsql 7.2?

\set autocommit off
\set autocommit on



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: turn off auto-commit
  2002-08-30 17:29 turn off auto-commit Waruna Geekiyanage <waruna@nirmani.com>
@ 2002-08-31 00:48 ` Bruce Momjian <pgman@candle.pha.pa.us>
  2002-09-04 15:49   ` Re: turn off auto-commit Waruna Geekiyanage <waruna@nirmani.com>
  1 sibling, 1 reply; 13+ messages in thread

From: Bruce Momjian @ 2002-08-31 00:48 UTC (permalink / raw)
  To: Waruna Geekiyanage <waruna@nirmani.com>; +Cc: pgsql-admin


There is no option in 7.2, but it will appear in 7.3, due out in a few
months.


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

Waruna Geekiyanage wrote:
> How to turn off auto-commit in pgsql 7.2?

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



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: turn off auto-commit
  2002-08-30 17:29 turn off auto-commit Waruna Geekiyanage <waruna@nirmani.com>
  2002-08-31 00:48 ` Re: turn off auto-commit Bruce Momjian <pgman@candle.pha.pa.us>
@ 2002-09-04 15:49   ` Waruna Geekiyanage <waruna@nirmani.com>
  2002-09-04 17:05     ` Re: turn off auto-commit Bruce Momjian <pgman@candle.pha.pa.us>
  2002-09-05 16:49     ` Re: turn off auto-commit Bruce Momjian <pgman@candle.pha.pa.us>
  0 siblings, 2 replies; 13+ messages in thread

From: Waruna Geekiyanage @ 2002-09-04 15:49 UTC (permalink / raw)
  To: Bruce Momjian <pgman@candle.pha.pa.us>; +Cc: pgsql-admin

Does turn fsync off equivalent to turn autocommit off?


----- Original Message -----
From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Waruna Geekiyanage <waruna@nirmani.com>
Cc: <pgsql-admin@postgresql.org>
Sent: Saturday, August 31, 2002 6:48 AM
Subject: Re: [ADMIN] turn off auto-commit


>
> There is no option in 7.2, but it will appear in 7.3, due out in a few
> months.
>
>
> --------------------------------------------------------------------------
-
>
> Waruna Geekiyanage wrote:
> > How to turn off auto-commit in pgsql 7.2?
>
> --
>   Bruce Momjian                        |  http://candle.pha.pa.us
>   pgman@candle.pha.pa.us               |  (610) 359-1001
>   +  If your life is a hard drive,     |  13 Roberts Road
>   +  Christ can be your backup.        |  Newtown Square, Pennsylvania
19073
>
>





^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: turn off auto-commit
  2002-08-30 17:29 turn off auto-commit Waruna Geekiyanage <waruna@nirmani.com>
  2002-08-31 00:48 ` Re: turn off auto-commit Bruce Momjian <pgman@candle.pha.pa.us>
  2002-09-04 15:49   ` Re: turn off auto-commit Waruna Geekiyanage <waruna@nirmani.com>
@ 2002-09-04 17:05     ` Bruce Momjian <pgman@candle.pha.pa.us>
  1 sibling, 0 replies; 13+ messages in thread

From: Bruce Momjian @ 2002-09-04 17:05 UTC (permalink / raw)
  To: Waruna Geekiyanage <waruna@nirmani.com>; +Cc: pgsql-admin


No, they are unrelated.

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

Waruna Geekiyanage wrote:
> Does turn fsync off equivalent to turn autocommit off?
> 
> 
> ----- Original Message -----
> From: Bruce Momjian <pgman@candle.pha.pa.us>
> To: Waruna Geekiyanage <waruna@nirmani.com>
> Cc: <pgsql-admin@postgresql.org>
> Sent: Saturday, August 31, 2002 6:48 AM
> Subject: Re: [ADMIN] turn off auto-commit
> 
> 
> >
> > There is no option in 7.2, but it will appear in 7.3, due out in a few
> > months.
> >
> >
> > --------------------------------------------------------------------------
> -
> >
> > Waruna Geekiyanage wrote:
> > > How to turn off auto-commit in pgsql 7.2?
> >
> > --
> >   Bruce Momjian                        |  http://candle.pha.pa.us
> >   pgman@candle.pha.pa.us               |  (610) 359-1001
> >   +  If your life is a hard drive,     |  13 Roberts Road
> >   +  Christ can be your backup.        |  Newtown Square, Pennsylvania
> 19073
> >
> >
> 
> 
> 

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



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: turn off auto-commit
  2002-08-30 17:29 turn off auto-commit Waruna Geekiyanage <waruna@nirmani.com>
  2002-08-31 00:48 ` Re: turn off auto-commit Bruce Momjian <pgman@candle.pha.pa.us>
  2002-09-04 15:49   ` Re: turn off auto-commit Waruna Geekiyanage <waruna@nirmani.com>
@ 2002-09-05 16:49     ` Bruce Momjian <pgman@candle.pha.pa.us>
  2002-09-05 17:55       ` Re: turn off auto-commit Björn Lundin <bjorn.lundin@swipnet.se>
  1 sibling, 1 reply; 13+ messages in thread

From: Bruce Momjian @ 2002-09-05 16:49 UTC (permalink / raw)
  To: Waruna Geekiyanage <waruna@nirmani.com>; +Cc: pgsql-admin

Waruna Geekiyanage wrote:
> Does turn fsync off equivalent to turn autocommit off?

No, fsync is related to flushing information to disk. It doesn't relate
to autocommit.

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



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: turn off auto-commit
  2002-08-30 17:29 turn off auto-commit Waruna Geekiyanage <waruna@nirmani.com>
  2002-08-31 00:48 ` Re: turn off auto-commit Bruce Momjian <pgman@candle.pha.pa.us>
  2002-09-04 15:49   ` Re: turn off auto-commit Waruna Geekiyanage <waruna@nirmani.com>
  2002-09-05 16:49     ` Re: turn off auto-commit Bruce Momjian <pgman@candle.pha.pa.us>
@ 2002-09-05 17:55       ` Björn Lundin <bjorn.lundin@swipnet.se>
  2002-09-05 18:46         ` Re: turn off auto-commit Nick Fankhauser <nickf@ontko.com>
  2002-09-05 18:57         ` Re: turn off auto-commit Bruce Momjian <pgman@candle.pha.pa.us>
  0 siblings, 2 replies; 13+ messages in thread

From: Björn Lundin @ 2002-09-05 17:55 UTC (permalink / raw)
  To: pgsql-admin

Bruce Momjian wrote:

> Waruna Geekiyanage wrote:
>> Does turn fsync off equivalent to turn autocommit off?
> 
> No, fsync is related to flushing information to disk. It doesn't relate
> to autocommit.
> 
This auto-commit on/off, is this what I think it is;
a way off NOT needing to enclose several statements in a begin/commit,
but having a new transaction directly after a commit, in psql, like 
Oracle's sql*plus?

If so, in what version was this introduced, or is this mentioned somewhere
on the web?

regards
/Björn Lundin



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: turn off auto-commit
  2002-08-30 17:29 turn off auto-commit Waruna Geekiyanage <waruna@nirmani.com>
  2002-08-31 00:48 ` Re: turn off auto-commit Bruce Momjian <pgman@candle.pha.pa.us>
  2002-09-04 15:49   ` Re: turn off auto-commit Waruna Geekiyanage <waruna@nirmani.com>
  2002-09-05 16:49     ` Re: turn off auto-commit Bruce Momjian <pgman@candle.pha.pa.us>
  2002-09-05 17:55       ` Re: turn off auto-commit Björn Lundin <bjorn.lundin@swipnet.se>
@ 2002-09-05 18:46         ` Nick Fankhauser <nickf@ontko.com>
  1 sibling, 0 replies; 13+ messages in thread

From: Nick Fankhauser @ 2002-09-05 18:46 UTC (permalink / raw)
  To: Björn Lundin <bjorn.lundin@swipnet.se>; pgsql-admin



> like
> Oracle's sql*plus?

Yes, it seems to act just like sql*plus in this regard.

> If so, in what version was this introduced, or is this mentioned somewhere
> on the web?

I don't remember it ever not being there. I've been a user since version
6.5.

-Nick




^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: turn off auto-commit
  2002-08-30 17:29 turn off auto-commit Waruna Geekiyanage <waruna@nirmani.com>
  2002-08-31 00:48 ` Re: turn off auto-commit Bruce Momjian <pgman@candle.pha.pa.us>
  2002-09-04 15:49   ` Re: turn off auto-commit Waruna Geekiyanage <waruna@nirmani.com>
  2002-09-05 16:49     ` Re: turn off auto-commit Bruce Momjian <pgman@candle.pha.pa.us>
  2002-09-05 17:55       ` Re: turn off auto-commit Björn Lundin <bjorn.lundin@swipnet.se>
@ 2002-09-05 18:57         ` Bruce Momjian <pgman@candle.pha.pa.us>
  2002-09-05 20:25           ` Re: turn off auto-commit Björn Lundin <bjorn.lundin@swipnet.se>
  1 sibling, 1 reply; 13+ messages in thread

From: Bruce Momjian @ 2002-09-05 18:57 UTC (permalink / raw)
  To: Björn Lundin <bjorn.lundin@swipnet.se>; +Cc: pgsql-admin

Björn Lundin wrote:
> Bruce Momjian wrote:
> 
> > Waruna Geekiyanage wrote:
> >> Does turn fsync off equivalent to turn autocommit off?
> > 
> > No, fsync is related to flushing information to disk. It doesn't relate
> > to autocommit.
> > 
> This auto-commit on/off, is this what I think it is;
> a way off NOT needing to enclose several statements in a begin/commit,
> but having a new transaction directly after a commit, in psql, like 
> Oracle's sql*plus?
> 
> If so, in what version was this introduced, or is this mentioned somewhere
> on the web?

Yes, autocommit appears in 7.3, due out in a few months.

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



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: turn off auto-commit
  2002-08-30 17:29 turn off auto-commit Waruna Geekiyanage <waruna@nirmani.com>
  2002-08-31 00:48 ` Re: turn off auto-commit Bruce Momjian <pgman@candle.pha.pa.us>
  2002-09-04 15:49   ` Re: turn off auto-commit Waruna Geekiyanage <waruna@nirmani.com>
  2002-09-05 16:49     ` Re: turn off auto-commit Bruce Momjian <pgman@candle.pha.pa.us>
  2002-09-05 17:55       ` Re: turn off auto-commit Björn Lundin <bjorn.lundin@swipnet.se>
  2002-09-05 18:57         ` Re: turn off auto-commit Bruce Momjian <pgman@candle.pha.pa.us>
@ 2002-09-05 20:25           ` Björn Lundin <bjorn.lundin@swipnet.se>
  2002-09-05 20:40             ` Re: turn off auto-commit Nick Fankhauser <nickf@ontko.com>
  0 siblings, 1 reply; 13+ messages in thread

From: Björn Lundin @ 2002-09-05 20:25 UTC (permalink / raw)
  To: pgsql-admin

Bruce Momjian wrote:


> Yes, autocommit appears in 7.3, due out in a few months.

A very nice feature, thanks.

/Björn 




^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: turn off auto-commit
  2002-08-30 17:29 turn off auto-commit Waruna Geekiyanage <waruna@nirmani.com>
  2002-08-31 00:48 ` Re: turn off auto-commit Bruce Momjian <pgman@candle.pha.pa.us>
  2002-09-04 15:49   ` Re: turn off auto-commit Waruna Geekiyanage <waruna@nirmani.com>
  2002-09-05 16:49     ` Re: turn off auto-commit Bruce Momjian <pgman@candle.pha.pa.us>
  2002-09-05 17:55       ` Re: turn off auto-commit Björn Lundin <bjorn.lundin@swipnet.se>
  2002-09-05 18:57         ` Re: turn off auto-commit Bruce Momjian <pgman@candle.pha.pa.us>
  2002-09-05 20:25           ` Re: turn off auto-commit Björn Lundin <bjorn.lundin@swipnet.se>
@ 2002-09-05 20:40             ` Nick Fankhauser <nickf@ontko.com>
  2002-09-05 20:48               ` Re: turn off auto-commit Bruce Momjian <pgman@candle.pha.pa.us>
  0 siblings, 1 reply; 13+ messages in thread

From: Nick Fankhauser @ 2002-09-05 20:40 UTC (permalink / raw)
  To: pgsql-admin; pgman@candle.pha.pa.us


> Bruce Momjian wrote:
> 
> Yes, autocommit appears in 7.3, due out in a few months.

I'm confused. 

Isn't autocommit already there & on by default in psql currently?

-Nick



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: turn off auto-commit
  2002-08-30 17:29 turn off auto-commit Waruna Geekiyanage <waruna@nirmani.com>
  2002-08-31 00:48 ` Re: turn off auto-commit Bruce Momjian <pgman@candle.pha.pa.us>
  2002-09-04 15:49   ` Re: turn off auto-commit Waruna Geekiyanage <waruna@nirmani.com>
  2002-09-05 16:49     ` Re: turn off auto-commit Bruce Momjian <pgman@candle.pha.pa.us>
  2002-09-05 17:55       ` Re: turn off auto-commit Björn Lundin <bjorn.lundin@swipnet.se>
  2002-09-05 18:57         ` Re: turn off auto-commit Bruce Momjian <pgman@candle.pha.pa.us>
  2002-09-05 20:25           ` Re: turn off auto-commit Björn Lundin <bjorn.lundin@swipnet.se>
  2002-09-05 20:40             ` Re: turn off auto-commit Nick Fankhauser <nickf@ontko.com>
@ 2002-09-05 20:48               ` Bruce Momjian <pgman@candle.pha.pa.us>
  2002-09-05 20:50                 ` Re: turn off auto-commit Nick Fankhauser <nickf@ontko.com>
  0 siblings, 1 reply; 13+ messages in thread

From: Bruce Momjian @ 2002-09-05 20:48 UTC (permalink / raw)
  To: nickf@ontko.com; +Cc: pgsql-admin

Nick Fankhauser wrote:
> 
> > Bruce Momjian wrote:
> > 
> > Yes, autocommit appears in 7.3, due out in a few months.
> 
> I'm confused. 
> 
> Isn't autocommit already there & on by default in psql currently?

He wants to turn autocomit off:

	$ psql
	test=> UPDATE tab SET col = 1;
	test=> UPDATE tab2 SET col = 2;
	test=> COMMIT;

With autocommit off, you basically start in a multi-statement
transaction at the start and every time you commit.

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



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: turn off auto-commit
  2002-08-30 17:29 turn off auto-commit Waruna Geekiyanage <waruna@nirmani.com>
  2002-08-31 00:48 ` Re: turn off auto-commit Bruce Momjian <pgman@candle.pha.pa.us>
  2002-09-04 15:49   ` Re: turn off auto-commit Waruna Geekiyanage <waruna@nirmani.com>
  2002-09-05 16:49     ` Re: turn off auto-commit Bruce Momjian <pgman@candle.pha.pa.us>
  2002-09-05 17:55       ` Re: turn off auto-commit Björn Lundin <bjorn.lundin@swipnet.se>
  2002-09-05 18:57         ` Re: turn off auto-commit Bruce Momjian <pgman@candle.pha.pa.us>
  2002-09-05 20:25           ` Re: turn off auto-commit Björn Lundin <bjorn.lundin@swipnet.se>
  2002-09-05 20:40             ` Re: turn off auto-commit Nick Fankhauser <nickf@ontko.com>
  2002-09-05 20:48               ` Re: turn off auto-commit Bruce Momjian <pgman@candle.pha.pa.us>
@ 2002-09-05 20:50                 ` Nick Fankhauser <nickf@ontko.com>
  0 siblings, 0 replies; 13+ messages in thread

From: Nick Fankhauser @ 2002-09-05 20:50 UTC (permalink / raw)
  To: Bruce Momjian <pgman@candle.pha.pa.us>; +Cc: pgsql-admin

Oh! I thought Waruna wanted to turn it off, but Björn wanted to know if it
could be controlled via psql.

Either way, both questions got answered, so we're set.

-Nick

> -----Original Message-----
> From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]
> Sent: Thursday, September 05, 2002 3:48 PM
> To: nickf@ontko.com
> Cc: pgsql-admin@postgresql.org
> Subject: Re: [ADMIN] turn off auto-commit
>
>
> Nick Fankhauser wrote:
> >
> > > Bruce Momjian wrote:
> > >
> > > Yes, autocommit appears in 7.3, due out in a few months.
> >
> > I'm confused.
> >
> > Isn't autocommit already there & on by default in psql currently?
>
> He wants to turn autocomit off:
>
> 	$ psql
> 	test=> UPDATE tab SET col = 1;
> 	test=> UPDATE tab2 SET col = 2;
> 	test=> COMMIT;
>
> With autocommit off, you basically start in a multi-statement
> transaction at the start and every time you commit.
>
> --
>   Bruce Momjian                        |  http://candle.pha.pa.us
>   pgman@candle.pha.pa.us               |  (610) 359-1001
>   +  If your life is a hard drive,     |  13 Roberts Road
>   +  Christ can be your backup.        |  Newtown Square,
> Pennsylvania 19073
>




^ permalink  raw  reply  [nested|flat] 13+ messages in thread


end of thread, other threads:[~2002-09-05 20:50 UTC | newest]

Thread overview: 13+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-08-30 17:29 turn off auto-commit Waruna Geekiyanage <waruna@nirmani.com>
2002-08-30 19:38 ` Nick Fankhauser <nickf@ontko.com>
2002-08-31 00:48 ` Bruce Momjian <pgman@candle.pha.pa.us>
2002-09-04 15:49   ` Waruna Geekiyanage <waruna@nirmani.com>
2002-09-04 17:05     ` Bruce Momjian <pgman@candle.pha.pa.us>
2002-09-05 16:49     ` Bruce Momjian <pgman@candle.pha.pa.us>
2002-09-05 17:55       ` Björn Lundin <bjorn.lundin@swipnet.se>
2002-09-05 18:46         ` Nick Fankhauser <nickf@ontko.com>
2002-09-05 18:57         ` Bruce Momjian <pgman@candle.pha.pa.us>
2002-09-05 20:25           ` Björn Lundin <bjorn.lundin@swipnet.se>
2002-09-05 20:40             ` Nick Fankhauser <nickf@ontko.com>
2002-09-05 20:48               ` Bruce Momjian <pgman@candle.pha.pa.us>
2002-09-05 20:50                 ` Nick Fankhauser <nickf@ontko.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox