Re: Transaction aborts on syntax error.

Поиск
Список
Период
Сортировка
От Zeugswetter Andreas SB SD
Тема Re: Transaction aborts on syntax error.
Дата
Msg-id 46C15C39FEB2C44BA555E356FBCD6FA49620B2@m0114.s-mxs.net
обсуждение исходный текст
Ответ на Transaction aborts on syntax error.  (ramirez@idconcepts.org (Edwin S. Ramirez))
Ответы Re: Transaction aborts on syntax error.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
> In both cases, the transaction either commits or rollback occurs. No
> other option is possible at the end of the transaction, but in the first
> style of transaction semantics you get a "mid-way" decision point. This
> only refers to retryable errors, since errors like access rights
> violations and many other system errors aren't retryable. In the example

You seem to ignore the fact, that a lot of errors (and I assume most of
the real world cases, where the appl actually reacts inside a transaction) are
"repared" by these applications by doing something else instead.

Like the application does an insert gets a duplicate key error and does an update
instead. Or it does an insert gets a foreign key constraint violation,
populates the foreign table and does the insert again. Note that this programming
practice is more efficient, than letting the appl check beforehand if the error cases
are seldom.

It seems to me, that leaving all this to the client (which implicitly inserts
savepoints) can never be as efficient as a serverside feature.

Andreas


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: [PATCHES] log session end - again
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [PATCHES] log session end - again