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 amit.kapil...@gmail.com wrote: On Mon, Mar 10, 2014 at 11:37 PM, Robert Haas robertmh...@gmail.com 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

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 amit.kapil...@gmail.com wrote: On Thu, Feb 6, 2014 at 3:42 PM, Kyotaro HORIGUCHI horiguchi.kyot...@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

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 robertmh...@gmail.com 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,

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 amit.kapil...@gmail.com wrote: On Mon, Mar 10, 2014 at 8:18 PM, Robert Haas robertmh...@gmail.com 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

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 amit.kapil...@gmail.com wrote: On Mon, Mar 10, 2014 at 9:48 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Mon, Mar 10, 2014 at 8:18 PM, Robert Haas robertmh...@gmail.com wrote: I took a look at this patch. It seems to me that it doesn't do a

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 robertmh...@gmail.com 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

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 like

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 as

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 horiguchi.kyot...@lab.ntt.co.jp 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

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

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 horiguchi.kyot...@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

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

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

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 horiguchi.kyot...@lab.ntt.co.jp 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

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 horiguchi.kyot...@lab.ntt.co.jp 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

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 got

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 horiguchi.kyot...@lab.ntt.co.jp 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,

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 into

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 horiguchi.kyot...@lab.ntt.co.jp 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

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

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 horiguchi.kyot...@lab.ntt.co.jp 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

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 horiguchi.kyot...@lab.ntt.co.jp 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

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 amitlangot...@gmail.com wrote: On Mon, Jan 13, 2014 at 2:50 PM, Amit Kapila amit.kapil...@gmail.com 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

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 amit.kapil...@gmail.com 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

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 amitlangot...@gmail.com wrote: On Mon, Jan 13, 2014 at 2:50 PM, Amit Kapila amit.kapil...@gmail.com wrote: I have extended test (contrib) module dsm_demo such that now user can specify during dsm_demo_create the lifespan of segment. Applied

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 amit.kapil...@gmail.com wrote: On Mon, Jan 27, 2014 at 7:48 PM, Amit Langote amitlangot...@gmail.com wrote: On Mon, Jan 13, 2014 at 2:50 PM, Amit Kapila amit.kapil...@gmail.com wrote: I have extended test (contrib) module dsm_demo such that now user

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 amit.kapil...@gmail.com 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

[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: