Re: persistent connection using PHP and Transaction
От | Mark kirkwood |
---|---|
Тема | Re: persistent connection using PHP and Transaction |
Дата | |
Msg-id | 1009537466.2542.23.camel@spikey.slithery.org обсуждение исходный текст |
Ответ на | persistent connection using PHP and Transaction ("Ben-Nes Michael" <miki@canaan.co.il>) |
Список | pgsql-general |
You will not have trouble because of this, as the apache architecture prevents the situation occurring (as I understand it anyway) - If a new request needs an apache process to service it, then the ones that are still awaiting results from db backends (i.e currently in transactions) will not be on the "spare" queue, so apache will spawn another process or use one on the "spare" queue. This process will open a new db connection or reuse an existing one (which will be ready to start a new transaction in either case). You can configure this behaviour in httpd.conf ( StartServers, MinSpareServers and MaxSpareServers). In addition the situation you are describing is not allowed by many database managers. For example : Postgresql will not let you begin a transaction unless the current one has issued a commit/rollback. regards Mark >Hi All > >Will I have trouble while using persistent connection and transactions ? > >What will happen if in the middle of an transaction over p.connection >another transaction will start on the same connection ?
В списке pgsql-general по дате отправления: