On Wed, May 30, 2018 at 9:09 PM, Teodor Sigaev <teo...@sigaev.ru> wrote: >> The metapage upgrade should be performed under critical section. > > > Agree. But after close look I found that btm_version change isn't wal-logged > (near line 2251 in _bt_newroot). So btm_version is not propagated to > replica/backup/etc. >
I think it will always be set to BTREE_VERSION (See _bt_restore_meta). I see that other places like _bt_insertonpg, _bt_update_meta_cleanup_info, etc. that log meta page contents don't log version number, so if we want to log it, all such places also need to be modified, but I don't see the need for same. -- With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com