On Sun, Apr 14, 2019 at 11:59:45PM -0400, Gunther wrote: > On 4/14/2019 23:24, Tom Lane wrote: > >Any chance of extracting a self-contained test case that reproduces this? > With 18 million rows involved in the base tables, hardly. Were you able to reproduce the problem with SELECT (without INSERT) ? How many rows does it output ? Show explain analyze if possible. If that still errors, can you make it work with a small enough LIMIT ? We haven't seen the view - maybe it's very complicated, but can you reproduce with a simpler one ? Fewer joins ? Or fewer join conditions ? Justin