Re: Transactions and web applications

Поиск
Список
Период
Сортировка
От Lincoln Yeoh
Тема Re: Transactions and web applications
Дата
Msg-id 3.0.5.32.20000623144638.0090f340@pop.mecomb.po.my
обсуждение исходный текст
Список pgsql-general
Hi people,

What are the recommended ways to do transactions in web applications?

Right now I have persistent database connections, but currently they are
shared by multiple sessions. So I make sure that database level
transactions are closed after each page/http request.

In theory I could tie database connections to sessions, but then if I have
1000 outstanding (not necessarily active) sessions that would mean 1000
database connections, and 1000 postgres backend processes right? Ouch!

Because of this it looks like I may actually have to do application level
transactions instead of being able to rely solely on database level
transactions.

Am I missing something? Are there better/good alternatives?

Would it be possible to "name" transactions and continue them from other
database connections? Sounds impractical tho- what happens if two
connections try to continue a transaction at overlapping times :) (user
opens up multiple browsers from one page).

Cheerio,
Link.


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

Предыдущее
От: Lincoln Yeoh
Дата:
Сообщение: Re: How to select a row and an adjacent row?
Следующее
От: Dustin Sallings
Дата:
Сообщение: Re: How to select a row and an adjacent row?