Re: disable auto-commit
От | Warren Vanichuk |
---|---|
Тема | Re: disable auto-commit |
Дата | |
Msg-id | Pine.LNX.4.21.0010271519320.527-100000@urd.street-light.com обсуждение исходный текст |
Ответ на | Re: disable auto-commit ("Jacopo Silva" <jacoposilva@tin.it>) |
Список | 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
В списке pgsql-admin по дате отправления: