Re: [HACKERS] Error: dsa_area could not attach to a segment that has been freed

2017-10-05 Thread Gaddam Sai Ram
Hi Thomas, Thanks for cautioning us about possible memory leaks(during error cases) incase of long-lived DSA segements. Actually we are following an approach to avoid this DSA memory leaks. Let me explain our implementation and please validate and correct us in-case we

Re: [HACKERS] Error: dsa_area could not attach to a segment that has been freed

2017-09-20 Thread Craig Ringer
On 21 September 2017 at 05:50, Thomas Munro wrote: > On Thu, Sep 21, 2017 at 12:59 AM, Robert Haas > wrote: > > On Wed, Sep 20, 2017 at 5:54 AM, Craig Ringer > wrote: > >> By the way, dsa.c really needs a

Re: [HACKERS] Error: dsa_area could not attach to a segment that has been freed

2017-09-20 Thread Thomas Munro
On Thu, Sep 21, 2017 at 12:59 AM, Robert Haas wrote: > On Wed, Sep 20, 2017 at 5:54 AM, Craig Ringer wrote: >> By the way, dsa.c really needs a cross-reference to shm_toc.c and vice >> versa. With a hint as to when each is appropriate. > > /me

Re: [HACKERS] Error: dsa_area could not attach to a segment that has been freed

2017-09-20 Thread Tom Lane
Craig Ringer writes: > On 20 September 2017 at 16:55, Thomas Munro > wrote: >> There is a kind of garbage collection for palloc'd memory and >> also for other resources like file handles, but if you're using a big >> long lived DSA area you

Re: [HACKERS] Error: dsa_area could not attach to a segment that has been freed

2017-09-20 Thread Robert Haas
On Wed, Sep 20, 2017 at 5:54 AM, Craig Ringer wrote: > By the way, dsa.c really needs a cross-reference to shm_toc.c and vice > versa. With a hint as to when each is appropriate. /me blinks. Aren't those almost-entirely-unrelated facilities? -- Robert Haas EnterpriseDB:

Re: [HACKERS] Error: dsa_area could not attach to a segment that has been freed

2017-09-20 Thread Craig Ringer
On 20 September 2017 at 17:52, Craig Ringer wrote: > On 20 September 2017 at 16:55, Thomas Munro > wrote: > >> On Wed, Sep 20, 2017 at 6:14 PM, Gaddam Sai Ram >> wrote: >> > Thank you very much! That fixed my

Re: [HACKERS] Error: dsa_area could not attach to a segment that has been freed

2017-09-20 Thread Craig Ringer
On 20 September 2017 at 16:55, Thomas Munro wrote: > On Wed, Sep 20, 2017 at 6:14 PM, Gaddam Sai Ram > wrote: > > Thank you very much! That fixed my issue! :) > > I was in an assumption that pinning the area will increase its lifetime

Re: [HACKERS] Error: dsa_area could not attach to a segment that has been freed

2017-09-20 Thread Thomas Munro
On Wed, Sep 20, 2017 at 6:14 PM, Gaddam Sai Ram wrote: > Thank you very much! That fixed my issue! :) > I was in an assumption that pinning the area will increase its lifetime but > yeah after taking memory context into consideration its working fine! So far the

Re: [HACKERS] Error: dsa_area could not attach to a segment that has been freed

2017-09-20 Thread Gaddam Sai Ram
Thank you very much! That fixed my issue! :) I was in an assumption that pinning the area will increase its lifetime but yeah after taking memory context into consideration its working fine! Regards G. Sai Ram On Wed, 20 Sep 2017 11:16:19 +0530 Thomas Munro

Re: [HACKERS] Error: dsa_area could not attach to a segment that has been freed

2017-09-19 Thread Thomas Munro
On Fri, Sep 15, 2017 at 7:51 PM, Gaddam Sai Ram wrote: > As i'm pinning the dsa mapping after attach, it has to stay through out the > backend session. But not sure why its freed/corrupted. > > Kindly help me in fixing this issue. Attached the copy of my extension, >