From: Nikhil S. <ni...@st...> - 2013-03-08 06:39:21
|
>> IMHO, using TopMemoryContext to mean the top context of each thread is >> pretty confusing. Bad choice of name for the memory context according >> to me. Maybe we could have avoided this crash if we had used a >> different name for the context. >> >> This "TopMemoryContext" goes away when that thread goes away. So ain't >> nothing TOP about it. > > Well, let me at least try and defend because that's my baby :-) I > think I chose name TopTransactionContext because I wanted to give a > thread in GTM as much the same treatment as a process gets in > Postgres. So I stick to the same names, but invented TopMost to mean > the context which is global to the GTM process. My idea was and still > is that we should avoid using TopMost as much as we can because that > memory leaks will be hard to plug-in. Remember, we expect GTM to run > as long as any one component of the cluster is running.. which pretty > much means forever because while any one component of the cluster can > go down, but not the entire cluster. > > But if its causing confusion, I won't mind adding a code commentary to > explain the difference. Clearly my fault. > Thanks for the explanation Pavan. I come from the Postgres source code background and when I started looking at this problem I looked at the memory context and thought everything is fine because it said "TopMemoryContext". That confused me a little bit. Had it said "ThreadTopContext" it would have been much more readable IMHO. Regards, Nikhils -- StormDB - http://www.stormdb.com The Database Cloud Postgres-XC Support and Service |