As we can see, MemoizePath can be generated for partitioned AppendPath but not for union-all AppendPath.
For the fix I think we can relax the check in create_append_path and always use get_baserel_parampathinfo if the parent is a baserel.
BTW, IIUC currently we don't generate any parameterized MergeAppend paths, as explained in generate_orderedappend_paths. So the codes that gather information from a MergeAppend path's param_info for run-time partition pruning in create_merge_append_plan seem unnecessary.
Attached is a patch for this change and the changes described upthread.