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? "Merlin Moncure" <merlin.moncure@rcsonline.com>
Re: Does psql use nested transactions? Tom Lane <tgl@sss.pgh.pa.us>
Re: Does psql use nested transactions? Philip Warner <pjw@rhyme.com.au>
Re: Does psql use nested transactions? Bruce Momjian <pgman@candle.pha.pa.us>
Re: Does psql use nested transactions? Tom Lane <tgl@sss.pgh.pa.us>
Re: Does psql use nested transactions? Bruce Momjian <pgman@candle.pha.pa.us>
Re: Does psql use nested transactions? Philip Warner <pjw@rhyme.com.au>
Re: Does psql use nested transactions? Philip Warner <pjw@rhyme.com.au>
Re: Does psql use nested transactions? Tom Lane <tgl@sss.pgh.pa.us>
Re: Does psql use nested transactions? Honza Pazdziora <adelton@informatics.muni.cz>
Re: Does psql use nested transactions? Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Re: Does psql use nested transactions? Honza Pazdziora <adelton@informatics.muni.cz>
Re: Does psql use nested transactions? "Simon Riggs" <simon@2ndquadrant.com>
Re: Does psql use nested transactions? Greg Stark <gsstark@mit.edu>
Re: Does psql use nested transactions? Oliver Elphick <olly@lfix.co.uk>
Re: Does psql use nested transactions? Greg Stark <gsstark@mit.edu>
Re: Does psql use nested transactions? Dennis Bjorklund <db@zigo.dhs.org>
Re: Does psql use nested transactions? Gaetano Mendola <mendola@bigfoot.com>
Re: Does psql use nested transactions? Haroldo Stenger <haroldo.stenger@gmail.com>
Re: Does psql use nested transactions? Alvaro Herrera Munoz <alvherre@dcc.uchile.cl>
Re: Does psql use nested transactions? Tom Lane <tgl@sss.pgh.pa.us>
Re: Does psql use nested transactions? Philip Warner <pjw@rhyme.com.au>
Re: Does psql use nested transactions? Alvaro Herrera <alvherre@dcc.uchile.cl>
Re: Does psql use nested transactions? Haroldo Stenger <haroldo.stenger@gmail.com>
Re: Does psql use nested transactions? Alvaro Herrera <alvherre@dcc.uchile.cl>
Re: Does psql use nested transactions? Tom Lane <tgl@sss.pgh.pa.us>
Alvaro Herrera Munoz  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
Дата:
От: Tom Lane
Дата:
FAQ