I wrote: > What it looks like to me is that the code for setting up run-time > partition pruning has failed to consider the possibility of nested > partitioning: it's expecting that every partitioned table will have > at least one direct child that is a leaf. I'm not sure though > whether just the Assert is wrong, or there's more fundamental > issues here.
After looking into the git history I realized that this assertion is quite new, stemming from David's a929e17e5a8 of 2020-11-02. So there's something not right about that. regards, tom lane