Re: using the same connection?

Поиск
Список
Период
Сортировка
От ncm@zembu.com (Nathan Myers)
Тема Re: using the same connection?
Дата
Msg-id 20010206110406.O624@store.zembu.com
обсуждение исходный текст
Ответ на using the same connection?  (Mathieu Dube <mathieu_dube@videotron.ca>)
Ответы Re: using the same connection?  (Mathieu Dube <mathieu_dube@videotron.ca>)
Список pgsql-hackers
On Tue, Feb 06, 2001 at 11:08:49AM -0500, Mathieu Dube wrote:
> Hi y'all,
>     Is it a bad idea for an app to keep just a couple of connections to a
> database, put semaphore/mutex on them and reuse them all through the program?
>     Of course I would check if their PQstatus isnt at CONNECTION_BAD and
> reconnect if they were...

You would have to hold the lock from BEGIN until COMMIT.
Otherwise, connection re-use is normal.  

Nathan Myers
ncm@zembu.com


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

Предыдущее
От: ncm@zembu.com (Nathan Myers)
Дата:
Сообщение: Re: OID from insert has extra letter
Следующее
От: Karel Zak
Дата:
Сообщение: Re: 25 March 2001 bug