Andy Fan <zhihui.fan1...@gmail.com> writes: > On Wed, Nov 25, 2020 at 9:40 AM Tom Lane <t...@sss.pgh.pa.us> wrote: >> What exactly would be the value of that? >> ...
> I agree with this, but I don't think there is no value in my suggestion > unless I missed something. Per my current understanding, the code > is too easy to make the datadir incompatible with binary, which requires > user to do some extra work and my suggestion is to avoid that and > it is the value. It'd be fairly pointless to worry about this so far as ordinary users are concerned, who are only going to encounter the situation in connection with a major-version upgrade. There is no way that the only catalog incompatibility they'd face is an addition or removal of a field in some query node. In practice, a major-version upgrade is also going to involve things like these: * addition (or, sometimes, removal) of entire system catalogs * addition, removal, or redefinition of columns within an existing catalog * addition or removal of standard entries in system catalogs * restructuring of stored rules/expressions in ways that are more complicated than simple addition/removal of fields The second of those, in particular, is quite fatal to any idea of making a version-N backend executable work with version-not-N catalogs. Catalog rowtypes are wired into the C code at a pretty basic level. We already sweat a great deal to make user table contents be upwards compatible across major versions. I think that trying to take on some similar guarantee with respect to system catalog contents would serve mostly to waste a lot of developer manpower that can be put to much better uses. regards, tom lane