Re: Renaming MemoryContextResetAndDeleteChildren to MemoryContextReset
От | Tom Lane |
---|---|
Тема | Re: Renaming MemoryContextResetAndDeleteChildren to MemoryContextReset |
Дата | |
Msg-id | 31110.1424991946@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Renaming MemoryContextResetAndDeleteChildren to MemoryContextReset (Andres Freund <andres@2ndquadrant.com>) |
Ответы |
Re: Renaming MemoryContextResetAndDeleteChildren to
MemoryContextReset
|
Список | pgsql-hackers |
Andres Freund <andres@2ndquadrant.com> writes: > On 2015-02-26 17:45:26 -0500, Tom Lane wrote: >> With all due respect, that's utterly wrong. I have looked at every single >> MemoryContextReset call in the codebase, and as far as I can see the >> *only* one that is in an error path is elog.c:336, which I'm quite certain >> is wrong anyway (the other reset of ErrorContext in that file uses >> MemoryContextResetAndDeleteChildren, this one should too). > Sure, in the pg codebase. But there definitely are extensions using > memory contexts. And there's code that has to work across several > branches. Backpatching alone imo presents a risk; there's nothing to > warn you three years down the road that the MemoryContextReset() you > just backpatched doesn't work the same in the backbranches. > If the changes breaks some code it's likely actually a good thing: > Because, as you say, using MemoryContextReset() will likely be the wrong > thing, and they'll want to fix it for the existing branches as well. Is that likely to happen? I doubt it. They'll just mutter under their breath about useless API breakage and move on. Basically, this is a judgment call, and I disagree with your judgment. I think changing the behavior of MemoryContextReset is exactly what we want to have happen. (And I've got to say that I'm losing patience with backwards-compatibility arguments taken to this degree. We might as well stop development entirely.) regards, tom lane
В списке pgsql-hackers по дате отправления: