Re: Does psql use nested transactions?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Does psql use nested transactions?
Дата
Msg-id 10131.1092777045@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Does psql use nested transactions?  (Alvaro Herrera Munoz <alvherre@dcc.uchile.cl>)
Ответы Re: Does psql use nested transactions?  (Philip Warner <pjw@rhyme.com.au>)
Список pgsql-hackers
Alvaro Herrera Munoz <alvherre@dcc.uchile.cl> writes:
> Establishing a savepoint is a non-trivial operation (cost-wise).  Several
> internal server structures have to be prepared for it.

Check

> It's way cheaper than normal transaction start and commit,

Is it?  You have the same amount of work to do (sooner or later) in
terms of updating pg_clog, plus extra work to update pg_subtrans.
And in the abort case it can be worse than aborting a full xact, because
we have to do retail rather than wholesale release of locks, buffers, etc.

I have not had an opportunity to benchmark it but I fear a savepoint may
cost near as much as a full xact in practice.
        regards, tom lane


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

Предыдущее
От: Alvaro Herrera Munoz
Дата:
Сообщение: Re: Does psql use nested transactions?
Следующее
От: Tom Lane
Дата:
Сообщение: stop the presses (Re: 7.4.4 packaged ...)