Re: Assert failure in get_baserel_parampathinfo with lateral UNION ALL

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: wenhui qiu <qiuwenhuifx(at)gmail(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Assert failure in get_baserel_parampathinfo with lateral UNION ALL
Date: 2026-09-30 02:47:57
Message-ID: CAMbWs4_DBQyZRaphH3F0ks7C5SkEOuAQ4GX1nCAU9C728PyHYw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Sep 21, 2026 at 3:30 PM wenhui qiu <qiuwenhuifx(at)gmail(dot)com> wrote:
>> One thing I may be missing, though: after replacing `rinfo->clause_relids`, should we also update `rinfo->num_base_rels`?

Good point. I think we should do that. And it seems that commit
03107b4ed was sloppy about updating num_base_rels. On master the
problematic RestrictInfo has stale num_base_rels:

:num_base_rels 2
:clause_relids (b 1 2 3 8)

I'm a little surprised that that hasn't caused problems so far.

- Richard

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2026-09-30 02:56:23 Re: Direct TOAST v2, faster, smaller and no migration needed
Previous Message Bharath Rupireddy 2026-09-30 02:45:00 Re: Parallel autovacuum: DROP DATABASE WITH (FORCE) fails on the parallel workers