Search Postgresql Archives

Re: PREPARE TRANSACTION and webapps

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Lincoln Yeoh <lyeoh@xxxxxxxxxxxxx> 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

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux