Re: About adding a new filed to a struct in primnodes.h - Mailing list pgsql-hackers

From Andy Fan
Subject Re: About adding a new filed to a struct in primnodes.h
Date
Msg-id CAKU4AWrFA5QGO+hbyh6F346BVQC7APLEd5+rzO57guaZE9e-7Q@mail.gmail.com
Whole thread Raw
In response to Re: About adding a new filed to a struct in primnodes.h  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: About adding a new filed to a struct in primnodes.h  (Andy Fan <zhihui.fan1213@gmail.com>)
List pgsql-hackers


On Tue, Nov 24, 2020 at 11:11 PM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
On 2020-Nov-24, Andy Fan wrote:

> then we modified the copy/read/out functions for this node.  In
> _readFuncExpr,
> we probably add something like

> [ ... ]

> Then we will get a compatible issue if we create a view with the node in
> the older version and access the view with the new binary.

When nodes are modified, you have to increment CATALOG_VERSION_NO which
makes the new code incompatible with a datadir previously created

Thank you Alvaro. I just think this issue can be avoided without causing
the incompatible issue. IIUC, after the new binary isn't compatible with
the datadir,  the user has to dump/restore the whole database or use 
pg_upgrade.  It is kind of extra work. 


-- for precisely this reason.

I probably didn't get the real point of this,  sorry about that. 

--
Best Regards
Andy Fan

pgsql-hackers by date:

Previous
From: "tsunakawa.takay@fujitsu.com"
Date:
Subject: RE: A few new options for CHECKPOINT
Next
From: "tsunakawa.takay@fujitsu.com"
Date:
Subject: RE: [PoC] Non-volatile WAL buffer