Re: Assertion failure with LEFT JOINs among >500 relations

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Onder Kalaci <onderk(at)microsoft(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Assertion failure with LEFT JOINs among >500 relations
Date: 2020-10-09 00:36:18
Message-ID: CAApHDvpWWNVSumg_ZNwZ6diuMZ4MsnutWx+_snHJZpDU+-vKhw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 9 Oct 2020 at 12:59, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> If we did want to do something here, I'd consider something like
>
> if (isnan(outer_skip_rows))
> outer_skip_rows = 0;
> if (isnan(inner_skip_rows))
> inner_skip_rows = 0;

Are you worried about the costs above the join that triggers that
coming out as NaN with that fix? It appears that's the case. Cost
comparisons of paths with that are not going to do anything along the
lines of sane.

I guess whether or not that matters depends on if we expect any real
queries to hit this, or if we just want to stop the Assert failure.

... 500 joins. I'm willing to listen to the explanation use case, but
in absence of that explanation, I'd be leaning towards "you're doing
it wrong". If that turns out to be true, then perhaps your proposed
fix is okay.

David

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message tsunakawa.takay@fujitsu.com 2020-10-09 00:41:24 RE: [Patch] Optimize dropping of relation buffers using dlist
Previous Message Michael Paquier 2020-10-09 00:19:50 Re: [PATCH] ecpg: fix progname memory leak