Robert Haas wrote: > On Thu, Apr 12, 2018 at 8:55 AM, Alvaro Herrera <alvhe...@alvh.no-ip.org> > wrote: > > Amit Langote wrote: > >> Anyway, after reading your replies, I thought of taking a stab at unifying > >> the partitioning information that's cached by relcache.c. > > > > Wow. Now that's one large patch. I'm going to run with this for HEAD, > > but I think we should do a minimal fix for PG10. > > Is there really a compelling reason to do more than minimal fixes in > HEAD?
IMO there is ample reason for restructuring the lot of code that currently lives in catalog/partition.c. We're going to have to support this code for a minimum of six years -- and that's only if we get around to reorganizing it during pg12. I don't have a lot of faith that I'll be motivated to reorganize it in pg12, but I do know that I am motivated to reorganize it now. If we do happen to reorganize it in pg12, then any bugs we find afterwards will cost double in terms of backpatching the fixes than if we reorganize it now. I don't want my future self to curse my current self for not doing it when it was appropriate -- i.e. when it was fresh in my mind and freshly written. > We are (or should be) trying to stabilize this branch so we can > ship it and start the next one, Yes, that is what I am trying to do -- I want us to have a sane base upon which to do our work for years to come. Do we need more than minimal fixes in the memory context, FmgrInfo, and miscellaneous other fixes that Amit is proposing in this patch? That I don't know. I hope to have an answer for this later, and I think this is the reason for your final comment: > and the chances that heavy hacking on this will delay that process > seem better than average. Maybe if there are no bugs and it's just ugly coding, it is best left alone. But as I said, I don't know the answer yet. I will make sure to propose any functional code changes separately from code movement. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services