Alvaro Herrera wrote:

We can't actually release anything (commit the subtransactions), because
they may be savepoints established after that point, and they are
logically "inside" the previously established ones.  At RELEASE we can't
really release -- we just lose the name and thus the opportunity to
rollback to it.

The 2003 draft claims that RELEASE SAVEPOINT invalidates savepoints subsequent to the RELEASE:


1) Let S be the <savepoint name>.
2) If S does not identify a savepoint established in the current savepoint level,then an exception condition is raised:savepoint exception invalid specification.
3) The savepoint identified by S and all savepoints established in the current savepoint level subsequent to the establishment of S are destroyed.


So it sounds like we can commit the subtransaction on RELEASE.

Note that this is *not* the same when a savepoint name is reused; that just moves the name, but "contained" savepoints are still valid.

-O

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
     joining column's datatypes do not match

Reply via email to