Re: Transaction vs. Savepoints

Поиск
Список
Период
Сортировка
От Richard Broersma Jr
Тема Re: Transaction vs. Savepoints
Дата
Msg-id 476499.61561.qm@web31813.mail.mud.yahoo.com
обсуждение исходный текст
Ответ на Transaction vs. Savepoints  (Andreas <maps.on@gmx.net>)
Список pgsql-novice
> As far as I know, PG handles 1 transaction per connection an several
> savepoints boxed within.
> E.G.   T1 ( Sp1, Sp2, Sp3 )
> I could commit Sp1, rollback Sp2 and commit Sp3 in a session.
> If I commit T1 all those actions get permanently written to to DB
> whereas if I rollback T1 all committed savepoints within get rolled
> back, too.

As far as I know, Postgresql defaults to one transaction from ~every~ statement, not per every
connection.  You do have the option to explicitly open a transaction at the beginning of a
connection and commit at the end, but it certainly isn't the default.  if your connection crashes,
all commited transactions remain commited.

Regards,
Richard Broersma Jr.

В списке pgsql-novice по дате отправления:

Предыдущее
От: Johannes Bruegmann
Дата:
Сообщение: Re: relation 12345 is still open
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Transaction vs. Savepoints