From: | Mark kirkwood <markir(at)slingshot(dot)co(dot)nz> |
---|---|
To: | miki(at)canaan(dot)co(dot)il |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: persistent connection using PHP and Transaction |
Date: | 2001-12-28 11:04:25 |
Message-ID: | 1009537466.2542.23.camel@spikey.slithery.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 ?
From | Date | Subject | |
---|---|---|---|
Next Message | matthias.suess | 2001-12-28 12:53:07 | |
Previous Message | Joe Conway | 2001-12-28 06:45:32 | Re: First decent PostgreSQL CBT now on techdocs.postgresql.org |