Re: Retain dynamic shared memory segments for postmaster lifetime - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Retain dynamic shared memory segments for postmaster lifetime
Date
Msg-id CAA4eK1JWNOp5hTUvRDW4505LGrrFLCE--FAMeAoHA9ANiWVc7A@mail.gmail.com
Whole thread Raw
In response to Re: Retain dynamic shared memory segments for postmaster lifetime  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: Retain dynamic shared memory segments for postmaster lifetime  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Re: Retain dynamic shared memory segments for postmaster lifetime  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
> On Thu, Feb 6, 2014 at 3:42 PM, Kyotaro HORIGUCHI
> <horiguchi.kyotaro@lab.ntt.co.jp> wrote:
>> Hello, I've understood how this works and seems working as
>> expected.
>>
>>
>> The orphan section handles on postmaster have become a matter of
>> documentation.

I had explained this in function header of dsm_keep_segment().

>> Besides all above, I'd like to see a comment for the win32 code
>> about the 'DuplicateHandle hack', specifically, description that
>> the DuplicateHandle pushes the copy of the section handle to the
>> postmaster so the section can retain for the postmaster lifetime.

I had added a new function in dsm_impl.c for platform specific
handling and explained about new behaviour in function header.


> - "Global/PostgreSQL.%u" is the same literal constant with that
>   occurred in dsm_impl_windows. It should be defined as a
>   constant (or a macro).

Changed to hash define.

> - dms_impl_windows uses errcode_for_dynamic_shared_memory() for
>   ereport and it finally falls down to
>   errcode_for_file_access(). I think it is preferable, maybe

Changed as per suggestion.

Please find new version of patch attached with this mail containing
above changes.

Thanks for review.

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Viability of text HISTORY/INSTALL/regression README files (was Re: [COMMITTERS] pgsql: Document a few more regression test hazards.)
Next
From: Tom Lane
Date:
Subject: Postgres back-branch minor updates coming soon