Re: Concurrent testing PostgreSQL Vs MySQL

From: "Durai" <visolve_postgres(at)lycos(dot)co(dot)uk>
To: "Shridhar Daithankar" <shridhar_daithankar(at)myrealbox(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Concurrent testing PostgreSQL Vs MySQL
Date: 2003-11-21 11:53:42
Message-ID: 0f8101c3b026$22650f00$1a0110ac@dumco
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)myrealbox(dot)com>
To: "Durai" <visolve_postgres(at)lycos(dot)co(dot)uk>
Cc: <pgsql-general(at)postgresql(dot)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(at)postgresql(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Shridhar Daithankar 2003-11-21 11:58:03 Re: Concurrent testing PostgreSQL Vs MySQL
Previous Message Alex 2003-11-21 11:28:58 Re: SELECT Question