On 2018/11/14 19:28, Amit Langote wrote:
> Attached updated patches. Significant revisions are as follows (note that
> I reversed the order of 0001 and 0002):
>
> v6-0001-Overhaul-inheritance-update-delete-planning.patch
>
> The major changes is fixing the problem above.
>
> v6-0002-Store-inheritance-root-parent-index-in-otherrel-s.patch
>
> No change.
>
> v6-0003-Lazy-creation-of-RTEs-for-inheritance-children.patch
>
> Made inheritance expansion a separate step of make_one_rel whereas
> previously it would be invoked at the beginning of set_append_rel_size.
> Now, it runs just before set_base_rel_sizes. The same step also
> recursively expands (and performs pruning for) any child partitioned
> tables that were added by the expansion of partitioned tables originally
> mentioned in the query. With this change, we don't need to worry about
> the range table changing as set_base_rel_size is executing, which could
> lead to problems.
>
> v6-0004-Move-append-expansion-code-into-its-own-file.patch
> v6-0005-Teach-planner-to-only-process-unpruned-partitions.patch
> v6-0006-Do-not-lock-all-partitions-at-the-beginning.patch
This went out sooner than it should have. I hadn't waited for make
check-world to finish which showed that a file_fdw test exercising
inheritance crashed with 0001 patch due to a bogus Assert.
Fixed it in the attached version.
Thanks,
Amit