Re: Querry and SMP mechine - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Querry and SMP mechine
Date
Msg-id 20050807112259.GB8033@svana.org
Whole thread Raw
In response to Re: Querry and SMP mechine  (Michael Ben-Nes <miki@canaan.co.il>)
List pgsql-general
On Sun, Aug 07, 2005 at 02:15:50PM +0300, Michael Ben-Nes wrote:
> >Yep, PostgreSQL uses a single backend for each client, so if you want
> >to use all four processors, you need to be running four queries
> >simultaneously...
> >
> >
> You mean select 1, select 2 & sleect 3 will run on the same cpu becouse
> they submited from the same PSQL session ?
> Or each select will be run in turn on the most idle cpu ?

No, they are run in the same single process and run on one cpu. The OS
can ofcourse shift it to whichever CPU it thinks is most appropriate.
It can shift it in the middle of a query too, but that's not up to
PostgreSQL.

> Is this true for all the other OS or just for Linux ? (Bsd, solaris... )

A single client uses a single CPU at a time, but it's not tied to that
particular CPU.  That applies to all supported platforms...

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment

pgsql-general by date:

Previous
From: Michael Ben-Nes
Date:
Subject: Re: Querry and SMP mechine
Next
From: Mario Soto Cordones - Venezuela
Date:
Subject: postgresql Secure Mode