El Jue 25 Ene 2001 10:21, Frank Joerdens escribió:
> On the PostgreSQL lists there has been some discussion recently as to
> the mechanism behind, benefits and drawbacks, of persistent connections.
> In particular a scenario similar to the following was brought up:
>
> Browser A connects to Apache child N, and calls a web page that calls a
> script which issues SQL commands that involve opening and committing a
> transaction:
>
> - begin work;
> - do some selects, inserts, deletes, updates . . .
>
> Now, the question is: Is it conceivable that in the meantime, whilst
> Browser A is waiting for the output from the script, that Browser B
> talks to same Apache child, uses the same persistent connection, and
> messes up the transaction that Browser A initiated in some unpredictable
> way?
No, and thats why in the postgres list we talked about persistent connections
not having much benefits. That is because the connection is persistent to the
httpd child that called it and not to all.
> - do more selects, inserts, deletes, updates . . .
> - commit work;
Any way, for the SQL statements you wrote here, Browser B cound never (and
this is because postgres won't let it) mess with the transaccion browser A is
doing.
> My guess would be that the Apache child wouldn't allow Browser B to talk
> to it whilst Browser A is waiting for output from the script and that
> that means that everything is fine and hunky-dory . . . I'm not sure
> though, and there is nagging trace of murkiness.
Now be carefull. http connection open and close, they do not stay open, so if
you try to execute different SQL statments with different httpd connections,
your gonna have trouble (the sql server won't let you, because there is
another transaction been executed).
Saludos... :-)
--
System Administration: It's a dirty job,
but someone told I had to do it.
-----------------------------------------------------------------
Martín Marqués email: [EMAIL PROTECTED]
Santa Fe - Argentina http://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-----------------------------------------------------------------
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]