Re: Transaction vs. Savepoints - Mailing list pgsql-novice

From Richard Broersma Jr
Subject Re: Transaction vs. Savepoints
Date
Msg-id 476499.61561.qm@web31813.mail.mud.yahoo.com
Whole thread Raw
In response to Transaction vs. Savepoints  (Andreas <maps.on@gmx.net>)
List 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 by date:

Previous
From: Johannes Bruegmann
Date:
Subject: Re: relation 12345 is still open
Next
From: Tom Lane
Date:
Subject: Re: Transaction vs. Savepoints