Re: pgsql: Remove BufFile's isTemp flag.
От | Thomas Munro |
---|---|
Тема | Re: pgsql: Remove BufFile's isTemp flag. |
Дата | |
Msg-id | CAEepm=38U=A0Ftk3XV=yqHXubiCoG5mr6wxQpgxTnPVo5tJL=A@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: pgsql: Remove BufFile's isTemp flag. (Andres Freund <andres@anarazel.de>) |
Ответы |
Re: pgsql: Remove BufFile's isTemp flag.
|
Список | pgsql-committers |
On Sat, Nov 18, 2017 at 6:58 AM, Andres Freund <andres@anarazel.de> wrote: > On 2017-11-17 11:23:54 -0500, Tom Lane wrote: >> OK, after looking through the history, the reason for isTemp = false >> is indeed to allow BufFileCreate() to maintain its old semantics, >> wherein you could attach a BufFile to an already-existing, possibly >> non-temp file. There have not been any core callers of BufFileCreate() >> in a long time (maybe not since that commit, in fact), but I imagine >> I left it alone for fear that extensions might be using it. I see though >> that Bruce ifdef'd it out in 20ad43b5, so there aren't any extensions >> using it either. >> >> We should flat-out remove the function, since this change makes it >> impossible to resurrect with its old semantics. > > That sounds reasonable. > > >> I wonder whether we should then rename BufFileCreateTemp to just >> BufFileCreate, since it's no longer possible to have a BufFile that >> isn't temp. I suspect that some attention to the comments might be >> needed too. > > Thomas? Here's a patch that does those things. I'm slightly surprised by the renaming suggestion though, because it means that an extension that uses BufFile will need to know how to select the v10 and v11 function name as appropriate. Would you backpatch redirect support for the new name to older versions? -- Thomas Munro http://www.enterprisedb.com
Вложения
В списке pgsql-committers по дате отправления: