Re: Concurrent testing PostgreSQL Vs MySQL - Mailing list pgsql-general

From Durai
Subject Re: Concurrent testing PostgreSQL Vs MySQL
Date
Msg-id 0f8101c3b026$22650f00$1a0110ac@dumco
Whole thread Raw
In response to Concurrent testing PostgreSQL Vs MySQL  ("Durai" <visolve_postgres@lycos.co.uk>)
List pgsql-general
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" <shridhar_daithankar@myrealbox.com>
To: "Durai" <visolve_postgres@lycos.co.uk>
Cc: <pgsql-general@postgresql.org>
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 majordomo@postgresql.org
>


---
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


pgsql-general by date:

Previous
From: Alex
Date:
Subject: Re: SELECT Question
Next
From: Shridhar Daithankar
Date:
Subject: Re: Concurrent testing PostgreSQL Vs MySQL