Re: One process per session lack of sharing

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Greg Stark <stark(at)mit(dot)edu>
Cc: AMatveev(at)bitec(dot)ru, Dave Cramer <pg(at)fastcrypt(dot)com>, Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>, Craig Ringer <craig(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: One process per session lack of sharing
Date: 2016-07-18 19:44:35
Message-ID: CA+TgmoY_XpKET0V6V5A3ct=+95ddv0uWrmOKHfsTPCou1yynEg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jul 18, 2016 at 10:03 AM, Greg Stark <stark(at)mit(dot)edu> wrote:
> On Mon, Jul 18, 2016 at 2:41 PM, <AMatveev(at)bitec(dot)ru> wrote:
>> And I will be really happy when there are processors with infinite
>> performance and memory with infinite size.
>>:)))
>
> Well for what it's worth there's no theoretical difference between
> multi-process and multi-threaded. They're just two different APIs to
> create shared memory and other kernel data structures and they both
> allow all the sharing you want. In the API Postgres uses everything
> starts out non-shared and we explicitly set up the parts we want
> shared. In the other nearly everything starts shared though it's
> possible to unshare parts. Once they're set up the CPU and MMU don't
> really care what kernel API was used to set them up.

That's totally true, but allocating additional shared memory after
system startup is a pain. It's true that we now have DSM, but the
fact that DSM segments can be mapped in different addresses in
different processes is a nuisance. We will still get a lot of benefit
out of having DSM, but it's not right to imply that threading wouldn't
make things easier.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-07-18 19:47:58 Re: One process per session lack of sharing
Previous Message Tom Lane 2016-07-18 19:09:07 Updating our timezone code in the back branches