gpexpand: exclude master-only tables from the template
Gpexpand creates new primary segments by first creating a template from the master datadir and then copying it to the new segments. Some catalog tables are only meaningful on master, such as gp_segment_configuration, their content are then cleared on each new segment with the "delete from ..." commands. This works but is slow because we have to include the content of the master-only tables in the archive, distribute them via network, and clear them via the slow "delete from ..." commands -- the "truncate" command is fast but it is disallowed on catalog tables as filenode must not be changed for catalog tables. To make it faster we now exclude these tables from the template directly, so less data are transferred and there is no need to "delete from" them explicitly.
Showing
想要评论请 注册 或 登录