Re: Transaction aborts on syntax error. - Mailing list pgsql-hackers

From Zeugswetter Andreas SB SD
Subject Re: Transaction aborts on syntax error.
Date
Msg-id 46C15C39FEB2C44BA555E356FBCD6FA49620B3@m0114.s-mxs.net
Whole thread Raw
In response to Transaction aborts on syntax error.  (ramirez@idconcepts.org (Edwin S. Ramirez))
Responses Re: Transaction aborts on syntax error.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> > It seems to me, that leaving all this to the client (which implicitly
> > inserts savepoints) can never be as efficient as a serverside feature.
>
> I think this is an overly narrow view of "efficiency".  With client
> control, the client can insert savepoints whereever it needs them,

Yes, but not if the client API does implicit savepoints. So imho if it is not
cheap we should not start to supply API's that do them implicitly.

> which might not be for every statement.  Savepoints that you don't
> actually need are going to be a fairly expensive overhead, AFAICS.

Well with other db's per statement rollback is a no overhead feature,
so this is pg specific. (In the sense of: nothing is done that would not need
to be done anyway, since they all undo the changes)

Imho the 80% main use case for applications would be for "duplicate key"
to not abort. For interactive psql it would probably be the syntax error.
Maybe something can be done about those special cases to make partial
rollback cheaper for those.

Andreas


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Transaction aborts on syntax error.
Next
From: markw@osdl.org
Date:
Subject: Re: Proposed Query Planner TODO items