Search Postgresql Archives

Re: PostgreSQL process architecture question.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



guxiaobo1982@xxxxxxxxxxx ("Amber") writes:
>    We know PostgreSQL uses one dedicated server process to serve one
>  client connection, what we want to know is whether PostgreSQL use
>  multiple threads inside agents processes to take advantage of
>  multiple CPUs. In our site we have only a few concurrent
>  connections, so what occurs inside > agent process is very
>  important to us.

No, PostgreSQL does not attempt to make any use of threading at this
time.  The FAQ describes this quite nicely:

http://wiki.postgresql.org/wiki/Developer_FAQ#Why_don.27t_you_use_threads.2C_raw_devices.2C_async-I.2FO.2C_.3Cinsert_your_favorite_wizz-bang_feature_here.3E.3F

"Why don't you use threads, raw devices, async-I/O, <insert your favorite wizz-bang feature here>?

There is always a temptation to use the newest operating system features as soon as they arrive. We resist that temptation.

First, we support 15+ operating systems, so any new feature has to be
well established before we will consider it. Second, most new
wizz-bang features don't provide dramatic improvements. Third, they
usually have some downside, such as decreased reliability or
additional code required. Therefore, we don't rush to use new features
but rather wait for the feature to be established, then ask for
testing to show that a measurable improvement is possible.

As an example, threads are not currently used in the backend code because:

    * Historically, threads were unsupported and buggy.
    * An error in one backend can corrupt other backends.
    * Speed improvements using threads are small compared to the remaining backend startup time.
    * The backend code would be more complex. 

So, we are not ignorant of new features. It is just that we are
cautious about their adoption. The TODO list often contains links to
discussions showing our reasoning in these areas."
-- 
select 'cbbrowne' || '@' || 'cbbrowne.com';
http://cbbrowne.com/info/oses.html
Given  recent  events in  Florida,  the  tourism  board in  Texas  has
developed a new  advertising campaign based on the  slogan "Ya'll come
to Texas, where we ain't shot a tourist in a car since November 1963."


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux