Hello Sridhar,

No. Still Its not working.

I used the following command.

# bin/ab -c 5 -n 50 http://127.0.0.1:7070/testpgsql.php

I got the following error:

test=# ERROR:  deadlock detected
ERROR:  deadlock detected
WARNING:  COMMIT: no transaction in progress
WARNING:  COMMIT: no transaction in progress
WARNING:  COMMIT: no transaction in progress
WARNING:  COMMIT: no transaction in progress
WARNING:  COMMIT: no transaction in progress
WARNING:  COMMIT: no transaction in progress
ERROR:  deadlock detected
ERROR:  deadlock detected

The script works only it has to be like:

<?php
$dbconn = pg_connect("host=172.16.1.158 port=5432 dbname=test
user=postgres");
$result = pg_exec ($dbconn, "update table2 set C2=C2+1;");
pg_close($dbconn);
$dbconn = pg_connect("host=172.16.1.158 port=5432 dbname=test
user=postgres");
$result = pg_exec ($dbconn, "update table2 set C2=C2-1;");
pg_close($dbconn);
?>

Regs,
Durai.


----- Original Message ----- 
From: "Shridhar Daithankar" <[EMAIL PROTECTED]>
To: "Durai" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, November 21, 2003 4:09 PM
Subject: Re: [GENERAL] Concurrent testing PostgreSQL Vs MySQL


> Durai wrote:
>
> > Hello Shridhar,
> >
> >                     The script content is:
> > **
> > *# cat te**stpgsql.php*
> > *
> > *<?php
> > $dbconn = pg_connect("host=172.16.1.158 port=5432 dbname=test
> > user=postgres");
> > $result = pg_exec ($dbconn, "update table2 set C2=C2+1;");
> > $result = pg_exec ($dbconn, "update table2 set C2=C2-1;");
>
> $result = pg_exec ($dbconn, "commit;");
>
> > pg_close($dbconn);
> > ?>
> > #
>
> Try it now. It should work without problem.
>
>   shridhar
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.538 / Virus Database: 333 - Release Date: 11/11/2003


---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply via email to