Re: BUG #5229: Queing requests when not using psql

From: "Fredrik Palm" <fredrik(dot)palm(at)humlab(dot)umu(dot)se>
To: "'Magnus Hagander'" <magnus(at)hagander(dot)net>
Cc: "'pgsql-bugs'" <pgsql-bugs(at)postgresql(dot)org>, <fredrik(dot)palm(at)humlab(dot)umu(dot)se>
Subject: Re: BUG #5229: Queing requests when not using psql
Date: 2009-12-03 20:58:24
Message-ID: 000801ca745b$5aaa8110$0fff8330$@palm@humlab.umu.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi!

Thank you very much for your input, especially since I now found the problem
in my PHP-software.
We are using session to cache results from previous queries in order to more
quickly feed the client with data.
However, using sessions also seems to stop the PHP-software from having more
than one outgoing connection to postgres-server.

I am very convinced that this is the case since I monitored the request and
could that was the case.

Sorry for taking up your time, but at least my observation could help
others.

Cordially

Fredrik Palm
HUMlab Umeå University
Interested in facet browsing and dynamic query-building, se my paper here:
http://www.springerlink.com/content/0285j5422t0x17k4/
(also on google books)

-----Original Message-----
From: Magnus Hagander [mailto:magnus(at)hagander(dot)net]
Sent: den 3 december 2009 13:21
To: Fredrik Palm
Cc: pgsql-bugs
Subject: Re: [BUGS] BUG #5229: Queing requests when not using psql

2009/12/3 Fredrik Palm <fredrik(dot)palm(at)humlab(dot)umu(dot)se>:
>
> The following bug has been logged online:
>
> Bug reference:      5229
> Logged by:          Fredrik Palm
> Email address:      fredrik(dot)palm(at)humlab(dot)umu(dot)se
> PostgreSQL version: 8.3 & 8,4
> Operating system:   Vista 64
> Description:        Queing requests when not using psql
> Details:
>
> I am using a standard default installation of postgres.
> it being set up to accept connections  from other servers.
>
> When using multiple psql-client to access the database server from another
> machine the query (select * from table)
> retrieves the content with linear performance according to how many core I
> have (8)
>
> A) When repeating the same thing with for example multiple and different
> php-request from one apache/phpthe queries are bein queeed and executed in
> order and does not use any extra processers avaiable
>
> B) The same happen if I create multiple connections using PGadmin on the
> same client(multple instances as well as multiple connections)
>
> C) If I use different PHP-server accessing the database server, than the
> postgres database is using the CPU that exists.
>
> I think the multiple connection from the same client machine should be
able
> to use different threads on the database-server also for other clients the
> pgsql.

They are. Each connection runs as it's own process. Any chance you
have some weird software that forces them all to be scheduled on the
same CPU? (That's a part of the Windows scheduler, not PostgreSQL).

I guess it's also possible that PHP has some kind of mutex that makes
it run only one in parallel, but PostgreSQL doesn't. To prove that,
try running the comments through "psql.exe"-clients instead of PHP -
that way you can exclude (or not) that PHP is the issue.

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2009-12-03 22:30:38 Re: BUG #5232: plpythonu s=s.op() raises an exception
Previous Message Heikki Linnakangas 2009-12-03 20:20:48 Re: Assertion failure with a subtransaction and cursor