Skip site navigation (1) Skip section navigation (2)

Re: disable auto-commit

From: Warren Vanichuk <pyber(at)street-light(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: disable auto-commit
Date: 2000-10-27 22:21:52
Message-ID: Pine.LNX.4.21.0010271519320.527-100000@urd.street-light.com (view raw or flat)
Thread:
Lists: pgsql-admin
> Anyway even if you do not commit the changes are stored
> in the operating system disk cache and you cannot undo them.

I disagree, witness the following :

testbunker=> create table temptable (
testbunker->  foo int4,
testbunker->  bar text 
testbunker-> );
CREATE
testbunker=> insert into temptable values ( 1, 'bar' );
INSERT 34605 1
testbunker=> insert into temptable values ( 2, 'baz' );
INSERT 34606 1
testbunker=> insert into temptable values ( 3, 'foo' ); 
INSERT 34607 1
testbunker=> begin;
BEGIN
testbunker=> delete from temptable;
DELETE 3
testbunker=> select * from temptable;
foo|bar
---+---
(0 rows)

testbunker=> rollback;
ABORT
testbunker=> select * from temptable;
foo|bar
---+---
  1|bar
  2|baz
  3|foo
(3 rows)


As you can see, I disabled auto-commit, deleted everything from the table,
confirmed it was gone, then rolled back, and everything was as it was
before.

Sincerely, Warren


In response to

pgsql-admin by date

Next:From: Peter EisentrautDate: 2000-10-28 14:24:19
Subject: Re: Building in a different directory
Previous:From: RajanDate: 2000-10-27 13:04:12
Subject: postgres - initdb error

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group