Re: [COMMITTERS] pgsql: Make it easy to detach completely from shared memory.

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Robert Haas <rhaas(at)postgresql(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Make it easy to detach completely from shared memory.
Date: 2014-03-18 13:09:08
Message-ID: CA+Tgmob3AC47yAXm=p+XrVp=bLz8DVooAQ+-B5rGDE9+TivbsQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Tue, Mar 18, 2014 at 8:41 AM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> On 18 March 2014 11:59, Robert Haas <rhaas(at)postgresql(dot)org> wrote:
>> Make it easy to detach completely from shared memory.
>>
>> The new function dsm_detach_all() can be used either by postmaster
>> children that don't wish to take any risk of accidentally corrupting
>> shared memory; or by forked children of regular backends with
>> the same need. This patch also updates the postmaster children that
>> already do PGSharedMemoryDetach() to do dsm_detach_all() as well.
>>
>> Per discussion with Tom Lane.
>
> I think we need to document exactly why dsm_detach_all() isn't simply
> part of PGSharedMemoryDetach() ?
>
> Having two calls seems like a recipe for error in core and extensions.
>
> Perhaps we should consider a parameter for PGSharedMemoryDetach() ?

Yeah, maybe. It seems like a possible modularity violation, because
the PGSharedMemory... stuff has heretofore not needed to know anything
about DSM, and apart from this one function, it still wouldn't. On
the other hand, your argument is good, too.

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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2014-03-18 13:51:42 Re: [COMMITTERS] pgsql: Make it easy to detach completely from shared memory.
Previous Message Simon Riggs 2014-03-18 12:41:34 Re: [COMMITTERS] pgsql: Make it easy to detach completely from shared memory.

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2014-03-18 13:11:46 Re: Is this a bug?
Previous Message Simon Riggs 2014-03-18 12:44:38 Re: plpgsql.warn_shadow