Re: Retain dynamic shared memory segments for postmaster lifetime

From: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
To: amit(dot)kapila16(at)gmail(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Retain dynamic shared memory segments for postmaster lifetime
Date: 2014-02-12 08:32:30
Message-ID: 20140212.173230.233686288.horiguchi.kyotaro@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

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

This patch applies cleanly on current HEAD and build completed
successfully on both Windows and Linux. (but master needed to be
rewinded to some time ago for some compile errors.)

This works correctly as before.

Finally before send to commiters, would you mind changing the
name of the segment "Global/PostgreSQL.%u" as
'Global/PostgreSQL.dsm.%u" or something mentioned in the last my
email? However, it is a bit different thing from this patch so
I have no intention to compel to do the changing.

> >> The orphan section handles on postmaster have become a matter of
> >> documentation.
>
> I had explained this in function header of dsm_keep_segment().

The comment satisfies me. Thank you.

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

This seems quite clear for me.

> > - "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.

Thank you.

> > - 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.

I saw it done.

regards,

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Christian Kruse 2014-02-12 08:52:59 Re: Patch: compiling the docs under Gentoo
Previous Message KONDO Mitsumasa 2014-02-12 06:45:54 Re: Add min and max execute statement time in pg_stat_statement