AFAICT, the EState field es_BaseId and the CommonState field cs_base_id
are not used for anything, and so the plan-initialization code that
sets them is a complete waste of time.
Presumably these were once used for something, but I can't think of
any good reason not to remove them. Does anyone see a reason to
keep them?
regards, tom lane