Re: PREPARE TRANSACTION and webapps

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PREPARE TRANSACTION and webapps
Дата
Msg-id 11916.1131657064@sss.pgh.pa.us
обсуждение исходный текст
Ответ на PREPARE TRANSACTION and webapps  (Lincoln Yeoh <lyeoh@pop.jaring.my>)
Ответы Re: PREPARE TRANSACTION and webapps  (Lincoln Yeoh <lyeoh@pop.jaring.my>)
Список pgsql-general
Lincoln Yeoh <lyeoh@pop.jaring.my> writes:
> Is it OK to use PREPARE TRANSACTION and COMMIT PREPARED in order to have
> transactions that last longer than just a single web request?

> Previously it was usually a bad idea to keep database connections alive
> just to keep a transaction pending.

A prepared transaction eats just about the same resources (other than an
active connection) as a live one.  In particular it still holds its
locks, which makes leaving it around for a long time just as evil as
simply sitting on it in an un-prepared state.

            regards, tom lane

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

Предыдущее
От: Tamas Hegedus
Дата:
Сообщение: Locale/Indexing
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Locale/Indexing