Re: Nested transactions: low level stuff

Поиск
Список
Период
Сортировка
От Zeugswetter Andreas SB SD
Тема Re: Nested transactions: low level stuff
Дата
Msg-id 46C15C39FEB2C44BA555E356FBCD6FA4961F70@m0114.s-mxs.net
обсуждение исходный текст
Ответ на Nested transactions: low level stuff  (Manfred Koizar <mkoi-pg@aon.at>)
Список pgsql-hackers
> Who wants subtransactions with UNDO and who wants it with a separate
> transaction id for every subtransaction?

I think there is at least one special case, that would largely profit
from UNDO (or some other identical mechanism), namely an insert that
causes a constraint violation.

The standard way to program an "insert or update" is to do the one command
that will succeed in more cases first, then on failure do the other.
In PG this currently has to be done inefficiently by first doing the update
and then doing the insert. If we had implicit subtransactions, I think people
would start using the standard approach. It would probably not be too nice if
that would always leave dead tuples and index entries around.

Andreas



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: optimizer cost calculation problem
Следующее
От: "Zeugswetter Andreas SB SD"
Дата:
Сообщение: Re: Nested transactions: low level stuff