Re: [HACKERS] Retain dynamic shared memory segments for postmaster lifetime

2014-03-11 Thread Robert Haas
On Mon, Mar 10, 2014 at 11:26 PM, Amit Kapila wrote: > On Mon, Mar 10, 2014 at 11:37 PM, Robert Haas wrote: >> Looks good, committed. However, I changed it so that >> dsm_keep_segment() does not also perform the equivalent of >> dsm_keep_mapping(); those are two separate operations. > > So are y

Re: [HACKERS] Retain dynamic shared memory segments for postmaster lifetime

2014-03-10 Thread Amit Kapila
On Mon, Mar 10, 2014 at 11:37 PM, Robert Haas wrote: > Looks good, committed. However, I changed it so that > dsm_keep_segment() does not also perform the equivalent of > dsm_keep_mapping(); those are two separate operations. So are you expecting that if some one needs to retain dynamic segment'

Re: [HACKERS] Retain dynamic shared memory segments for postmaster lifetime

2014-03-10 Thread Robert Haas
On Mon, Mar 10, 2014 at 12:44 PM, Amit Kapila wrote: > On Mon, Mar 10, 2014 at 9:48 PM, Amit Kapila wrote: >> On Mon, Mar 10, 2014 at 8:18 PM, Robert Haas wrote: >>> I took a look at this patch. It seems to me that it doesn't do a very >>> good job maintaining the abstraction boundary between w

Re: [HACKERS] Retain dynamic shared memory segments for postmaster lifetime

2014-03-10 Thread Amit Kapila
On Mon, Mar 10, 2014 at 9:48 PM, Amit Kapila wrote: > On Mon, Mar 10, 2014 at 8:18 PM, Robert Haas wrote: >> I took a look at this patch. It seems to me that it doesn't do a very >> good job maintaining the abstraction boundary between what the dsm.c >> layer knows about and what the dsm_impl.c

Re: [HACKERS] Retain dynamic shared memory segments for postmaster lifetime

2014-03-10 Thread Amit Kapila
On Mon, Mar 10, 2014 at 8:18 PM, Robert Haas wrote: > I took a look at this patch. It seems to me that it doesn't do a very > good job maintaining the abstraction boundary between what the dsm.c > layer knows about and what the dsm_impl.c layer knows about. However, > AFAICS, these problems are

Re: [HACKERS] Retain dynamic shared memory segments for postmaster lifetime

2014-03-10 Thread Robert Haas
On Sat, Feb 8, 2014 at 2:31 AM, Amit Kapila wrote: >> On Thu, Feb 6, 2014 at 3:42 PM, Kyotaro HORIGUCHI >> 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

Re: [HACKERS] Retain dynamic shared memory segments for postmaster lifetime

2014-02-16 Thread Kyotaro HORIGUCHI
Thank you for letting me know of that. > Using MSVC. > We have gendef.pl which can do it. Mmm.. My eyes skipped over it. Everything became clear for me. Thank you. > Example in Postgres project properties, in > Configuration Properties->Build Events->Pre-Link Event, there > is a Command Line lik

Re: [HACKERS] Retain dynamic shared memory segments for postmaster lifetime

2014-02-12 Thread Kyotaro HORIGUCHI
Hello, I've marked this patch as 'Ready for committer'. > To be honest, I see no harm in changing the name as per your suggestion, > as it can improve segment naming for dynamic shared memory segments, > however there is no clear problem with current name as well, so I don't > want to change in pl

Re: [HACKERS] Retain dynamic shared memory segments for postmaster lifetime

2014-02-12 Thread Amit Kapila
On Wed, Feb 12, 2014 at 2:02 PM, Kyotaro HORIGUCHI wrote: > 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 > rewi

Re: [HACKERS] Retain dynamic shared memory segments for postmaster lifetime

2014-02-12 Thread Kyotaro HORIGUCHI
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 a

Re: [HACKERS] Retain dynamic shared memory segments for postmaster lifetime

2014-02-07 Thread Amit Kapila
> On Thu, Feb 6, 2014 at 3:42 PM, Kyotaro HORIGUCHI > 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(). >> Be

Re: [HACKERS] Retain dynamic shared memory segments for postmaster lifetime

2014-02-06 Thread Amit Kapila
On Thu, Feb 6, 2014 at 3:42 PM, Kyotaro HORIGUCHI wrote: > Hello, I've understood how this works and seems working as > expected. > >> Anyway this is just a test module so if things works for you by >> changing the above way, its fine. However I wonder why its not >> generating .def file for you.

Re: [HACKERS] Retain dynamic shared memory segments for postmaster lifetime

2014-02-06 Thread Amit Kapila
On Thu, Feb 6, 2014 at 4:10 PM, Kyotaro HORIGUCHI wrote: > Hello, let me say in passing, > >> However I wonder why its not generating .def file for you. > > Is the 'it' is Visual Studio IDE or CL? Mmm, as far as I know > .def file is a stuff that programmers should write by their hands > as a matt

Re: [HACKERS] Retain dynamic shared memory segments for postmaster lifetime

2014-02-06 Thread Kyotaro HORIGUCHI
Hello, let me say in passing, > However I wonder why its not generating .def file for you. Is the 'it' is Visual Studio IDE or CL? Mmm, as far as I know .def file is a stuff that programmers should write by their hands as a matter of course. I've found no way to automatically generate .def file

Re: [HACKERS] Retain dynamic shared memory segments for postmaster lifetime

2014-02-06 Thread Kyotaro HORIGUCHI
Hello, I've understood how this works and seems working as expected. > Anyway this is just a test module so if things works for you by > changing the above way, its fine. However I wonder why its not > generating .def file for you. Surely. Getting back on topic, using dsm_keep_segment, I saw pos

Re: [HACKERS] Retain dynamic shared memory segments for postmaster lifetime

2014-02-03 Thread Amit Kapila
On Tue, Feb 4, 2014 at 12:25 PM, Kyotaro HORIGUCHI wrote: > Hello, Now I got workable dll thanks for your advice. > >> I think both the problems are related and the reason is that dsm_demo.dll >> is not built properly. >> Let us first try to solve your second problem, because I think if >> that is

Re: [HACKERS] Retain dynamic shared memory segments for postmaster lifetime

2014-02-03 Thread Kyotaro HORIGUCHI
Hello, Now I got workable dll thanks for your advice. > I think both the problems are related and the reason is that dsm_demo.dll > is not built properly. > Let us first try to solve your second problem, because I think if > that is solved, you will not face problem-1. Thank you for kindness. I g

Re: [HACKERS] Retain dynamic shared memory segments for postmaster lifetime

2014-01-31 Thread Amit Kapila
On Fri, Jan 31, 2014 at 1:35 PM, Kyotaro HORIGUCHI wrote: > Hello, I've managed to reconstruct windows build environment and > tried to run the previous patch. Thanks. > > > I will apologize in advance for probably silly questions but I > have two problems. I think both the problems are related a

Re: [HACKERS] Retain dynamic shared memory segments for postmaster lifetime

2014-01-31 Thread Kyotaro HORIGUCHI
Hello, I've managed to reconstruct windows build environment and tried to run the previous patch. > > - DSM implimentation seems divided into generic part (dsm.c) and > >platform dependent part(dsm_impl.c). This dsm_keep_segment > >puts WIN32 specific part directly in

Re: [HACKERS] Retain dynamic shared memory segments for postmaster lifetime

2014-01-28 Thread Amit Kapila
On Tue, Jan 28, 2014 at 4:42 PM, Kyotaro HORIGUCHI wrote: > Hello, > >> Currently there is no way user can keep the dsm >> segments if he wants for postmaster lifetime, so I >> have exposed a new API dsm_keep_segment() >> to implement the same. > > I had a short look on this patch. Thanks. >

Re: [HACKERS] Retain dynamic shared memory segments for postmaster lifetime

2014-01-28 Thread Robert Haas
On Tue, Jan 28, 2014 at 6:12 AM, Kyotaro HORIGUCHI wrote: > I had a short look on this patch. > > - DSM implimentation seems divided into generic part (dsm.c) and >platform dependent part(dsm_impl.c). This dsm_keep_segment >puts WIN32 specific part directly into dms.c. I suppose it'd >

Re: [HACKERS] Retain dynamic shared memory segments for postmaster lifetime

2014-01-28 Thread Kyotaro HORIGUCHI
Hello, > Currently there is no way user can keep the dsm > segments if he wants for postmaster lifetime, so I > have exposed a new API dsm_keep_segment() > to implement the same. I had a short look on this patch. - DSM implimentation seems divided into generic part (dsm.c) and platform depe

Re: [HACKERS] Retain dynamic shared memory segments for postmaster lifetime

2014-01-27 Thread Amit Langote
On Tue, Jan 28, 2014 at 1:41 PM, Amit Kapila wrote: > On Mon, Jan 27, 2014 at 7:48 PM, Amit Langote wrote: >> On Mon, Jan 13, 2014 at 2:50 PM, Amit Kapila wrote: >>> I have extended test (contrib) module dsm_demo such that now user >>> can specify during dsm_demo_create the lifespan of segment.

Re: [HACKERS] Retain dynamic shared memory segments for postmaster lifetime

2014-01-27 Thread Amit Kapila
On Mon, Jan 27, 2014 at 7:48 PM, Amit Langote wrote: > On Mon, Jan 13, 2014 at 2:50 PM, Amit Kapila wrote: >> I have extended test (contrib) module dsm_demo such that now user >> can specify during dsm_demo_create the lifespan of segment. > > Applied dsm_keep_segment_v1.patch and dsm_demo_v1.patc

Re: [HACKERS] Retain dynamic shared memory segments for postmaster lifetime

2014-01-27 Thread Amit Langote
On Mon, Jan 27, 2014 at 11:18 PM, Amit Langote wrote: > On Mon, Jan 13, 2014 at 2:50 PM, Amit Kapila wrote: >> I have extended test (contrib) module dsm_demo such that now user >> can specify during dsm_demo_create the lifespan of segment. >> The values it can accept are 0 or 1. Default value is

Re: [HACKERS] Retain dynamic shared memory segments for postmaster lifetime

2014-01-27 Thread Amit Langote
On Mon, Jan 13, 2014 at 2:50 PM, Amit Kapila wrote: > I have extended test (contrib) module dsm_demo such that now user > can specify during dsm_demo_create the lifespan of segment. > The values it can accept are 0 or 1. Default value is 0. > 0 -- means segment will be accessible for session life

Re: [HACKERS] Retain dynamic shared memory segments for postmaster lifetime

2014-01-12 Thread Amit Kapila
On Sun, Jan 12, 2014 at 12:41 PM, Amit Kapila wrote: > Currently there is no way user can keep the dsm > segments if he wants for postmaster lifetime, so I > have exposed a new API dsm_keep_segment() > to implement the same. > > The specs and need for this API is already discussed > in thread: > h

[HACKERS] Retain dynamic shared memory segments for postmaster lifetime

2014-01-11 Thread Amit Kapila
Currently there is no way user can keep the dsm segments if he wants for postmaster lifetime, so I have exposed a new API dsm_keep_segment() to implement the same. The specs and need for this API is already discussed in thread: http://www.postgresql.org/message-id/ca+tgmoakogujqbedgeykysxud9eaidqx