On Sun, Jan 20, 2019 at 5:19 AM John Naylor <john.nay...@2ndquadrant.com> wrote: >
Review of v16-0002-During-pg_upgrade-conditionally-skip-transfer-of: - * Copy/link any fsm and vm files, if they exist + * Copy/link any fsm and vm files, if they exist and if they would + * be created in the new cluster. */ - transfer_relfile(&maps[mapnum], "_fsm", vm_must_add_frozenbit); + if ((maps[mapnum].relkind != RELKIND_RELATION && + maps[mapnum].relkind != RELKIND_TOASTVALUE) || + first_seg_size > HEAP_FSM_CREATION_THRESHOLD * BLCKSZ || + GET_MAJOR_VERSION (new_cluster.major_version) <= 1100) + (void) transfer_relfile(&maps[mapnum], "_fsm", vm_must_add_frozenbit); So we won't allow transfer of FSM files if their size is below HEAP_FSM_CREATION_THRESHOLD. What will be its behavior in link mode? It seems that the old files will remain there. Will it create any problem when we try to create the files via the new server, can you once test this case? Also, another case to think in this regard is the upgrade for standby servers, if you read below paragraph from the user manual [1], you will see what I am worried about? "What this does is to record the links created by pg_upgrade's link mode that connect files in the old and new clusters on the primary server. It then finds matching files in the standby's old cluster and creates links for them in the standby's new cluster. Files that were not linked on the primary are copied from the primary to the standby. (They are usually small.)" [1] - https://www.postgresql.org/docs/devel/pgupgrade.html -- With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com