From: Koichi S. <koi...@gm...> - 2013-08-08 06:16:15
|
Okay. Are there any more input to this? We have to fix the leak anyway and I'd like to commit this unless there's any more issue. Regards; --- Koichi 2013/8/6 Nikhil Sontakke <ni...@st...> > > > >> One of the reasons why I chose to do it this way is to reduce the impact >> on the code that I borrowed heavily from Postgres and turned it into >> multi-threaded architecture. Thats why we also see something like >> TopMostMemoryContext. I wanted to emulate thread as a process, but a few >> things were required to be at process level. >> > > Yeah, I understand your point of view. I am just saying that it confuses > things. I have reported one core earlier just because someone palloc'ed in > TopMemoryContext "assuming" that it's the top memory context and not the > memory context of the thread. I am talking about those kinds of confusion. > > As I said, the current code looks ok enough and takes care to cleanup > memory contexts appropriately AFAICS. > > Regards, > Nikhils > > >> >> >>> thrinfo->thr_error_context = AllocSetContextCreate(ErrorContext, >>> >>> The comment above this line says >>> >>> /* >>> * Each thread gets its own ErrorContext and its a child of >>> ErrorContext of >>> * the main process >>> */ >>> >>> However due to the inclusion of gtm.h, ErrorContext becomes a macro and >>> expands to GetMyThreadInfo->thr_error_context which should be NULL! >>> >>> However the code is careful to track and release contexts AFAICS. But we >>> need to be mindful of this in the future as well. >>> >>> >> Will check that code. >> >> Thanks, >> Pavan >> > > > > -- > StormDB - http://www.stormdb.com > The Database Cloud > |